modified ui_extra_args_dict function to pick arguments#3245
modified ui_extra_args_dict function to pick arguments#3245cyberw merged 9 commits intolocustio:masterfrom
Conversation
|
Hi @ivan-krupin-magicmedia @cyberw I've create a PR, please review it. |
2e39cf6 to
b71599d
Compare
b71599d to
74b98fb
Compare
|
Uh, there's some changes in this PR that don't relate to the issue? If you want me to look at it, please keep it minimal. |
Hi @cyberw , please review them. I've removed some more irrelevant code |
|
Still some irrelevant code changes. |
removed more irrelevant code |
|
Cool stuff! You can probably ignore the unrelated test fails. I wonder, why are you testing this? Perhaps you could validate in a more end-to-end fashion, maybe adding the check somewhere here (right now it only tests the forwarding of args, it it should be reasonably easy to add) locust/locust/test/test_main.py Line 104 in e5298b8 |
|
Hi @cyberw , so sorry to spam your inbox. Just want to work here more, please help me with reviewing and suggesting changes. Thanks :) |
|
Hi @cyberw @amandasaurus @sanga @pjenvey , please review this PR and suggest me changes. |
|
Looks great! |
Problem
When running Locust in distributed mode (master-worker), custom command-line arguments were not displayed correctly in the Web UI. The Web UI would show default values instead of the actual values passed via command line to the master.
issue - #3206
Root Cause
The ui_extra_args_dict() function was always parsing arguments from scratch without considering the already-parsed options stored in environment.parsed_options
Solution
Added test: Created comprehensive unit test in test_parser.py to verify the fix.
Solution
Modified argument_parser.py: Added an optional parsed_options parameter to ui_extra_args_dict() so it can use already-parsed options instead of re-parsing from scratch.
Modified web.py: Updated the call to ui_extra_args_dict() to pass the current parsed_options, ensuring the Web UI displays actual current values.
Added test: Created comprehensive unit test in test_parser.py to verify the fix.