#3304 [HOTFIX] pkgdb for problems with python-bugzilla
Closed: Fixed None Opened 9 years ago by toshio.

python-bugzilla 0.6.0's getuser does not work with the upgraded bugzilla.redhat.com. Change to use RHBugzilla3 for now.

'''This hotfix has not been applied upstream''' as this is a bandaid over the fact that python-bugzilla is broken and the RHBugzilla3 API is going away someday so we won't be able to keep using this.

diff --git a/modules/hotfix/files/pkgdb/utils.py b/modules/hotfix/files/pkgdb/utils.py
index 021a80f..8c121c5 100644
--- a/modules/hotfix/files/pkgdb/utils.py
+++ b/modules/hotfix/files/pkgdb/utils.py
@@ -51,7 +51,7 @@ from cherrypy import request
from sqlalchemy import select, and_
from sqlalchemy.exceptions import DataError

-from bugzilla import Bugzilla
+from bugzilla import RHBugzilla3
import memcache

# The Fedora Account System Module
@@ -218,9 +218,8 @@ def get_unprivileged_bz():
bz_server = config.get('bugzilla.queryurl', config.get('bugzilla.url',
bz_url = bz_server + '/xmlrpc.cgi'
- _unpriv_bugzilla = Bugzilla(url=bz_url, cookiefile=None)
+ _unpriv_bugzilla = RHBugzilla3(url=bz_url, cookiefile=None)
return _unpriv_bugzilla

def get_bz():
'''Retrieve a connection to bugzilla
@@ -236,7 +235,7 @@ def get_bz():
bz_url = bz_server + '/xmlrpc.cgi'
bz_user = config.get('bugzilla.user')
bz_pass = config.get('bugzilla.password')
- _bugzilla = Bugzilla(url=bz_url, user=bz_user, password=bz_pass,
+ _bugzilla = RHBugzilla3(url=bz_url, user=bz_user, password=bz_pass,
return _bugzilla

Committed in This is applied to the 0.5.5 release and it's in the stable and 0.5.x branches of the repository. Didn't see the notes in this hotfix. Do we want to do a reverse of this as a hotfix and see if things still function (now that we have the new python-bugzilla installed)? If so, I can do that and if it works it can go into the update we're working on in our extra week.

Applied a hotfix to patch this '''out''' of the version on production to see if it works with the new python-bugzilla. So far it's looking like it works but it is much slower. This is painfully noticable on things like the bugz.fedoraproject.org/yum (or kernel) pages.

Closing -- I've unapplied the hotfix that patches this out of production as it is slower with it in. We can restore this if the old interface stops working.

Login to comment on this ticket.