WebUI: update users, spawn_rate, host and run_time in parsed_options
(for LoadShapes that might access it)
#2656
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Hit a bug where, by using a custom
LoadTestShape
withuse_common_options
(as described here) noticed that therun_time
set through the web UI is not persisted toparsed_options
(which I'd be accessing from my custom shape class'self.runner.environment.parsed_options.run_time
). This value was thus always grabbing the initial value set through config / cli options, which is pretty unexpected to me. I understand the intended use case here, as specified in the docs, is to "reuse command line parameters", but since the web UI still allows changing this value updates should IMO reflect everywhere they're referenced downstream.Changes
Persist this value to
parsed_options_dict
on theswarm
endpoint handler. It'd make even more sense to me to do this for all values though, by changing theelif
condition on current line 235 toif
, not sure why it's done that way and why not all values are persisted/propagated.Thanks!