Bug 459920

Summary: Creating updates from command line is pain
Product: [Fedora] Fedora Reporter: Lubomir Rintel <lkundrak>
Component: bodhiAssignee: Luke Macken <lmacken>
Status: CLOSED CURRENTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: medium    
Version: rawhideCC: a.badger, cweyl, pfrields, tim.lauridsen, updates
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2008-10-13 02:02:44 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Lubomir Rintel 2008-08-24 14:53:37 UTC
Description of problem:

[lkundrak@jesus F-9]$ make update

(editing the template)

/usr/bin/bodhi:30: DeprecationWarning: fedora.tg.client has moved to fedora.client.  This will disappear in 0.4
  from fedora.tg.client import BaseClient, AuthError, ServerError
Reading from bodhi.template 
Traceback (most recent call last):
  File "/usr/bin/bodhi", line 316, in <module>
    bodhi.parse_file(opts)
  File "/usr/bin/bodhi", line 213, in parse_file
    opts.type = types[para.upper()]
KeyError: 'BUGFIX'
make: *** [bodhi] Error 1

(finding out that I should write "B" instead of "bugfix" and "S" instead of "stable")

[lkundrak@jesus F-9]$ make update
/usr/bin/bodhi:30: DeprecationWarning: fedora.tg.client has moved to fedora.client.  This will disappear in 0.4
  from fedora.tg.client import BaseClient, AuthError, ServerError
Reading from bodhi.template 
Creating new update for imapsync-1.255-3.fc9
HTTP Error 500: Internal error
make: *** [bodhi] Error 255

(being curious how to track down the error)

[lkundrak@jesus F-9]$ /usr/bin/bodhi --new --release F9 --file bodhi.template imapsync-1.255-3.fc9 -u lkundrak --verbose
/usr/bin/bodhi:30: DeprecationWarning: fedora.tg.client has moved to fedora.client.  This will disappear in 0.4
  from fedora.tg.client import BaseClient, AuthError, ServerError
Loaded session Set-Cookie: tg-visit=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx; Path=/
Reading from bodhi.template
...
Creating new update for imapsync-1.255-3.fc9
Creating request https://admin.fedoraproject.org/updates/save?tg_format=json
HTTP Error 500: Internal error
[lkundrak@jesus F-9]$ 

Expected results:

There are several things wrong with the above.

1.) The user shouldn't be exposed to the deprecation warnings, it can cause warnings

2.) The template says one should use keywords such as bugfix, enhancement, stable, testing, etc. though only the first letters works.

3.) In case bodhi fails to process the template, user should be given chance to re-edit the file and re-submit the update. Overwriting the filled-in template on next make update run is a major annoyance.

4.) The --verbose didn't reveal much about the nature of the problem I was hitting. Thought all visits to https://admin.fedoraproject.org/updates/save?tg_format=json result in 500 errors.

Additional info:

These all are not necessarily problems of bodhi. If you are not the one who is in charge of the affected parts of common Makefile, I'd be very glad if you could either add the right person to cc or clone the bug.

Thanks!

Comment 1 Fedora Update System 2008-08-24 16:06:48 UTC
Please try the latest bodhi packages from koji:

    koji download-build bodhi-0.5.1-1.fc9

Comment 2 Luke Macken 2008-08-27 00:23:44 UTC
Please try the latest bodhi and python-fedora packages from koji:

    koji download-build bodhi-0.5.1-2.fc9
    koji download-build python-fedora-0.3.5-1.fc10

Comment 3 Luke Macken 2008-10-13 02:02:44 UTC
This issue is resolved.  If you encounter this again, please make sure you are running the latest bodhi-client, python-fedora and Makefile.common, and then re-open this bug.