Bug 1087147 - KeyError: 'id' when building package and waiting on build
Summary: KeyError: 'id' when building package and waiting on build
Keywords:
Status: CLOSED DUPLICATE of bug 1086624
Alias: None
Product: Fedora EPEL
Classification: Fedora
Component: copr
Version: el6
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: ---
Assignee: Miroslav Suchý
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-04-14 05:08 UTC by Dominic Cleal
Modified: 2014-04-14 06:32 UTC (History)
1 user (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2014-04-14 06:32:48 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Dominic Cleal 2014-04-14 05:08:25 UTC
Description of problem:
When submitting a build with copr-cli, an error has recently started being thrown when the cli tool starts trying to wait for the build to complete.  The build is however successfully submitted.

$ copr-cli build puppet-nightly http://people.redhat.com/~dcleal/puppet-nightly/puppet-3.5.1-0.1rc1.229.el6.src.rpm
Build was added to puppet-nightly.
Traceback (most recent call last):
  File "/usr/bin/copr-cli", line 9, in <module>
    load_entry_point('copr-cli==0.2.0', 'console_scripts', 'copr-cli')()
  File "/usr/lib/python2.6/site-packages/copr_cli/main.py", line 127, in main
    arg.func(arg)
  File "/usr/lib/python2.6/site-packages/copr_cli/main.py", line 22, in action_build
    args.memory, args.timeout, not args.nowait)
  File "/usr/lib/python2.6/site-packages/copr_cli/subcommands.py", line 204, in build
    print("Build ID: {0}".format(output['id']))
KeyError: 'id'

Version-Release number of selected component (if applicable):
copr-cli-1.26-1.el6.noarch

How reproducible:
Always

Steps to Reproduce:
1. copr-cli build ...

Actual results:
see above, near-immediate exit

Expected results:
task information printed and the copr-cli command to wait

Additional info:
The "output" hash causing the error contains:
{u'output': u'ok', u'message': u'Build was added to puppet-nightly.', u'ids': [9055]}

It appears 4e04de0f790365d4400c804920ef09f1979275de in copr changed the build ID to a plural "ids".  Since 9th April, the existing copr-cli 1.26 package in EPEL6 (and Fedora) has been throwing this error, so I presume the server has recently been updated to copr 1.31 or higher.

Hopefully releasing a new client, and/or adding a compatibility "id" back to the API would fix this.

Comment 1 Miroslav Suchý 2014-04-14 06:32:48 UTC

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


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