Red Hat Bugzilla – Bug 1473067
bkr workflow-simple example command in documentation errors
Last modified: 2017-10-02 23:57:54 EDT
Description of problem:
The example command in the man page for bkr workflow-simple
produces an error
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. run bkr workflow-simple --arch x86_64 --random \
--family RedHatEnterpriseLinux6 --variant Server \
--package apache --package tomcat6
( ensure that you have that distro --family and --arch available in your running application)
You must specify a package, type or task to run
Since a package is included in the command, I would expect the error message to refer to a task /task type. Or I would expect the command to function as it is.
My config for the client is set up for beaker in a box.
I'm not sure if this is a documentation error, or if there is a need for update in the code to be in line with what the documentation says.
Basically right now the commands works *only* if there is a task specified.
So should the error message (and hence the example in the docs) be updated to "You must specify a task to run"?
I guess the problem with the example is it assumes you have tasks in your task library which are declared with
So when the example is run against our internal production Beaker instance, that will be the case. But on a freshly created Beaker it won't be.
We should probably replace the "--package apache --package tomcat6" options with "--task /some/example/task" so that hopefully it is clear that the command is not supposed to work *as is* out of the box. You would only use it if you have some actual tasks you want to run.
We could also improve the error message in the case where the user passes --package, but that doesn't match anything. Right now the error message wording *looks* like a mistake because it's telling you you must pass a package but you *did* pass a package.
Maybe print a warning to stderr if a --package option is given but Beaker returns no tasks matching that package?
And then we change the error message to be something like:
No tasks specified to be run
Hint: Use --task, --package, or --type to select tasks
*** Bug 1473068 has been marked as a duplicate of this bug. ***
This bug fix is included in beaker-client-24.4-0.git.17.9c963d813 which is currently available for download here:
Verified that the error messages make sense now:
$ bkr workflow-simple --dry-run --family RedHatEnterpriseLinux7 --arch x86_64
Usage: bkr workflow-simple [options]
bkr: error: No tasks specified to be run
Hint: Use --task, --package, --taskfile or --task-type to select tasks
$ bkr workflow-simple --dry-run --family RedHatEnterpriseLinux7 --arch x86_64 --package asdfasdf
No tasks match the specified option(s)
Beaker 24.4 has been released.