Bug 1078610 - The output of command "bkr workflow-installer-test" should be consistent with other workflow command.
Summary: The output of command "bkr workflow-installer-test" should be consistent with...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Beaker
Classification: Retired
Component: command line
Version: develop
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: 0.16.2
Assignee: Amit Saha
QA Contact: tools-bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-03-20 02:48 UTC by xjia
Modified: 2018-02-06 00:41 UTC (History)
8 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2014-04-28 23:00:38 UTC
Embargoed:


Attachments (Terms of Use)

Description xjia 2014-03-20 02:48:39 UTC
Description of problem:
The first issue is :if don't add "--verbose" option, there will be no output. 
For example, command 'bkr workflow-simple" will tell user a job has submitted
[root@qe-xjia-beaker-client ~]# bkr workflow-simple --arch x86_64 --family  RedHatEnterpriseLinux6 --task  /distribution/utils/dummy --tag=None  --verbos
Submitted: ['J:3872']

The second issue is : if add "--verbose" option, there will be a message "Dry run only, nothing submitted.", which to confuse users whether this job is submitted or not.
[root@qe-xjia-beaker-client ~]# bkr workflow-installer-test --arch x86_64 --verbose  --template kickstart.ks --family  RedHatEnterpriseLinux6 --task  /distribution/utils/dummy --tag=None 
Dry run only, nothing submitted.
Submitted: ['J:3874']


Version-Release number of selected component (if applicable):
develop

How reproducible:
100%

Steps to Reproduce:
1.bkr workflow-installer-test --arch x86_64 --template kickstart.ks --family  RedHatEnterpriseLinux6 --task  /distribution/utils/dummy --tag=None
2.bkr workflow-installer-test --arch x86_64 --verbose  --template kickstart.ks --family  RedHatEnterpriseLinux6 --task  /distribution/utils/dummy --tag=None 
3.

Actual results:
1. Nothing
2. Dry run only, nothing submitted.
Submitted: ['J:3874']

Expected results:
1. Submitted: ['J:XXXX']
2. Delete the message "Dry run only, nothing submitted." or use other message.

Additional info:

Comment 2 Amit Saha 2014-04-10 02:07:48 UTC
http://gerrit.beaker-project.org/#/c/3014/

Comment 3 Dan Callaghan 2014-04-14 02:09:38 UTC
To clarify, the guiding principle here is consistency: we want workflow-installer-test to behave consistently with all other bkr workflow commands, because needless inconsistency is surprising and introduces cognitive load on our users for no reason.

The inconsistency here is related to the --verbose option, which was added to all workflow commands as part of the patch for workflow-installer-test but it has no effect in any of the others. Also, no other workflow commands print the message "Dry run only, nothing submitted." That's because the reason to a dry run is to see the generated XML using --debug, in which case having the extra sentence appear on stdout makes the output invalid XML.

So the expected result here is that workflow-installer-test behaves the same as the other workflow commands:
* If --debug is given, the generated XML is printed (this works currently)
* If --dryrun is given, no message about that fact is printed
* If submission succeeds, a message is printed like this: Submitted: ['J:123']

Additionally, the --verbose option should be removed from all workflow commands since it will have no effect anymore.

Comment 4 Dan Callaghan 2014-04-14 02:12:24 UTC
(In reply to Dan Callaghan from comment #3)
> Additionally, the --verbose option should be removed from all workflow
> commands since it will have no effect anymore.

If anyone wants to enhance the workflow commands to produce different output (for example, add a way to silence the Submitted message) we can do that. I know Ray was keen for the workflow commands to have a --verbose switch. But that needs to be a separate RFE and the patch needs to be applied to all workflow commands consistently. It also cannot change the existing default output format of the commands since that would be a break in compatibility.

Comment 7 Dan Callaghan 2014-04-28 23:00:38 UTC
Beaker 0.16.2 has been released.


Note You need to log in before you can comment on or make changes to this bug.