Bug 673109

Summary: workflow-tcms traceback if --run is not set and no --distro specified
Product: [Retired] Beaker Reporter: Karel Volný <kvolny>
Component: command lineAssignee: Petr Šplíchal <psplicha>
Status: CLOSED ERRATA QA Contact:
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 0.7CC: bpeck, dcallagh, mcsontos, ohudlick, psplicha, rmancy
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: 2.0-43 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-03-30 07:17:37 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Karel Volný 2011-01-27 13:25:10 UTC
Description of problem:
I refer to bug 632199#c13

Version-Release number of selected component (if applicable):
qa-tools-2.0-18

How reproducible:
always

Steps to Reproduce:
1. bkr workflow-tcms --errata 2010:10352 --new --task=/CoreOS/mysql/Security/CVE-2010-3839-JOIN-hang-in-stored-proc

 
Actual results:
Traceback (most recent call last):
  File "/usr/bin/bkr", line 9, in <module>
    load_entry_point('bkr.client==0.5.63', 'console_scripts', 'bkr')()
  File "/usr/lib/python2.7/site-packages/bkr/client/main.py", line 55, in main
    return parser.run()
  File "/usr/lib/python2.7/site-packages/kobo/cli.py", line 282, in run
    cmd.run(*cmd_args, **cmd_kwargs)
  File
"/usr/lib/python2.7/site-packages/bkr/client/commands/cmd_workflow_tcms.py",
line 491, in run
    job.schedule([TestRun(id) for id in runs])
  File
"/usr/lib/python2.7/site-packages/bkr/client/commands/cmd_workflow_tcms.py",
line 415, in schedule
    self.check_environment()
  File
"/usr/lib/python2.7/site-packages/bkr/client/commands/cmd_workflow_tcms.py",
line 244, in check_environment
    self.distro = self.runs[0].build
IndexError: list index out of range


Expected results:
pretty error message

Additional info:
if bug 673108 is resolved, this is in vain, as this wouldn't be error condition - however, a bit more care about the (unexpected) inputs is always nice ...

Comment 1 Petr Šplíchal 2012-03-30 07:17:37 UTC
This has been already fixed by completely rewritten distro detection:
http://git.engineering.redhat.com/?p=users/psplicha/tcms;a=commitdiff;h=21c1851d