validate_args() in rally.cli.cliutils not working correctly if more than 1 required_args in function being validated
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Rally |
Fix Released
|
Undecided
|
Piyush |
Bug Description
<UPDATED AFTER FEEDBACK FROM ALEXANDER>
The validate_args() function in rally.cli.cliutils (https:/
For e.g. rally task start will refer to https:/
The current logic for validate_args() is based on count of required_args and NOT the name of the required_args.
This logic may fail if there is more than 1 required args for any function.
For e.g.
>>> from rally.cli.cliutils import validate_args
>>> validate_
>>>
lambda x,y:None has 2 required args- x and y
The above case should have thrown an error saying Missing arguments: y. But with current code base it does NOT throw an error for missing argument "y"
NOTE- This issue does not occur so far since all the CLI command functions in various classes ( task, deployment, show, verify, .. ) had only 1 REQUIRED ARGUMENT always. Hence the count logic works currently.
If we introduce / modify any Rally command function in future that needs more than 1 required arguments then the bug condition will appear.
Changed in rally: | |
assignee: | nobody → Piyush Raman Srivastava (pirsriva) |
Fix proposed to branch: master /review. openstack. org/293569
Review: https:/