Bug 710518 - [Beaker] cmdline syntax inconsistent and help is incorrect
Summary: [Beaker] cmdline syntax inconsistent and help is incorrect
Keywords:
Status: CLOSED DUPLICATE of bug 643882
Alias: None
Product: Beaker
Classification: Retired
Component: command line
Version: 0.6
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified vote
Target Milestone: ---
Assignee: Bill Peck
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-06-03 15:25 UTC by Jeff Burke
Modified: 2014-08-12 04:33 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-06-03 18:38:52 UTC


Attachments (Terms of Use)

Description Jeff Burke 2011-06-03 15:25:22 UTC
Description of problem:

When using the bkr command line options the syntax between command is not consistent and the help is not reliable.

Here are some examples:

-------------------------------
 $ bkr job-watch --help
Usage: bkr job-watch [options] <taskspec>...

The above usage should say 
Usage: bkr job-watch [options] <jobid>...
-------------------------------

-------------------------------
The inconsistency is when you use job-watch vs watchdog
It is not clear when you need to use a prefix like J: vs T:

$ bkr job-watch J:84399
Watching tasks (this may be safely interrupted)...
J:84399 kernel-2.6.18-260.el5.kpq1 KernelTier1: Completed
--> Completed: 1 [total: 1]

$ bkr job-watch 84399
Watching tasks (this may be safely interrupted)...
Exception: exceptions.ValueError:need more than 1 value to unpack

$ bkr watchdog-show T:2053459
Exception: bkr.server.bexceptions.BX:'Invalid task ID: T:2053459'

$ bkr watchdog-show 2053459
2053459: 85333
-------------------------------

Comment 1 Bill Peck 2011-06-03 17:16:02 UTC
(In reply to comment #0)
> Description of problem:
> 
> When using the bkr command line options the syntax between command is not
> consistent and the help is not reliable.
> 
> Here are some examples:
> 
> -------------------------------
>  $ bkr job-watch --help
> Usage: bkr job-watch [options] <taskspec>...
> 
> The above usage should say 
> Usage: bkr job-watch [options] <jobid>...

Why should it say jobid?   You say yourself that its not valid below.

> -------------------------------
> 
> -------------------------------
> The inconsistency is when you use job-watch vs watchdog
> It is not clear when you need to use a prefix like J: vs T:
> 
> $ bkr job-watch J:84399
> Watching tasks (this may be safely interrupted)...
> J:84399 kernel-2.6.18-260.el5.kpq1 KernelTier1: Completed
> --> Completed: 1 [total: 1]
> 
> $ bkr job-watch 84399
> Watching tasks (this may be safely interrupted)...
> Exception: exceptions.ValueError:need more than 1 value to unpack
> 
> $ bkr watchdog-show T:2053459
> Exception: bkr.server.bexceptions.BX:'Invalid task ID: T:2053459'
> 
> $ bkr watchdog-show 2053459
> 2053459: 85333
> -------------------------------

watchdog-show should be updated to use <taskspec>  and we should provide some example taskspecs J:1234 for job and RS:1233 for RecipeSet, etc..

Comment 2 Marian Csontos 2011-06-03 18:38:52 UTC
watchdog is a special case - it does not accept anything else but task id. More in Bug 643882.

*** This bug has been marked as a duplicate of bug 643882 ***

Comment 3 Jeff Burke 2011-06-03 18:58:19 UTC
Reply to Comment #1
Q: Why should it say jobid?  You say yourself that its not valid below.
It is semantics to me if it is jobid or J:jobid but it should reflect what it needs.

RE: watchdog-show should be updated to use <taskspec>  and we should provide some
example taskspecs J:1234 for job and RS:1233 for RecipeSet, etc..
- Thank you


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