Changing CLI to use more generic item and item-type input to match better with
the rest of libtaskotron.
Also, changing usage of bodhi-id to bodhi_id so that it can be used in yaml
templates because '-' is an invalid character for jinja2 identifiers. Fixes T127
Details
- Reviewers
kparal mkrizek - Maniphest Tasks
- T127: Change runtask command line args so that it uses the same 'unit' and 'unit-type' format used by results and taskotron-trigger
- Commits
- rLTRN007947583f5e: Merge branch 'feature/T127-units-on-commandline' into develop
rLTRNc225370d35c2: updating readme to reflect changes in the cli, task yaml format
rLTRN41b0e38be4f1: changing cli to use item and item-type instead of specific data types
Updated existing unit tests to handle the new input format, added new unit tests
to cover the argument processing. Have been testing locally in a dev env for
taskotron
Diff Detail
- Lint
Lint Skipped - Unit
Unit Tests Skipped
Other than one nitpick, the example of running tasks in readme.rst needs to be updated as well. Looks good to me otherwise.
| libtaskotron/runner.py | ||
|---|---|---|
| 144 | $ python runtask.py -i xchat-2.8.8-21.fc20 -a x86_64 task-rpmlint/rpmlint.yml File "runtask.py", line 4, in <module> runner.main() File "/home/mkrizek/devel/libtaskotron/libtaskotron/runner.py", line 182, in main task_runner.run() File "/home/mkrizek/devel/libtaskotron/libtaskotron/runner.py", line 28, in run self._validate_input() File "/home/mkrizek/devel/libtaskotron/libtaskotron/runner.py", line 125, in _validate_input 'was not defined' % arg) TaskotronYamlError: Required input arg envr was not defined If you omit -t argument, the error message might be confusing for someone because it asks for envr and the type is koji_build. | |
the example of running tasks in readme.rst needs to be updated as well
Good catch, I had forgotten about that
If you omit -t argument, the error message might be confusing for someone because it asks for envr and the type is koji_build.
Good point. I suspect that some changes to the validation code are going to be needed. I'd really like to get this code pushed today so we can get a stg system set up, would you be OK with letting this slide if I file a ticket to fix the problem?
would you be OK with letting this slide if I file a ticket to fix the problem?
Yeah, not a big deal anyway.
$ python runtask.py -i xchat-2.8.8-21.fc20 -a x86_64 task-rpmlint/rpmlint.yml
[libtaskotron:logger.py:63] 2014-04-15 16:39:29 DEBUG doing stream logging
[libtaskotron:logger.py:34] 2014-04-15 16:39:29 CRITICAL Traceback (most recent call last):
TaskotronYamlError: Required input arg envr was not defined
If you omit -t argument, the error message might be confusing for someone because it asks for envr and the type is koji_build.