Bug 555178 (getproducts) - I am getting an exception in Rawhide, from setroubleshoot
Summary: I am getting an exception in Rawhide, from setroubleshoot
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: getproducts
Product: Fedora
Classification: Fedora
Component: python-bugzilla
Version: 13
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
Assignee: Will Woods
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
: 555975 (view as bug list)
Depends On: 556516
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-01-13 22:02 UTC by Daniel Walsh
Modified: 2011-05-08 09:01 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-05-08 09:01:05 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
attempted fix (1002 bytes, patch)
2010-01-16 01:37 UTC, Gavin Romig-Koch
no flags Details | Diff

Description Daniel Walsh 2010-01-13 22:02:21 UTC
Description of problem:

Loaded plugins: presto, refresh-packagekit
Traceback (most recent call last):
  File "/usr/lib64/python2.6/site-packages/setroubleshoot/browser.py", line 122, in submit_button_clicked
    self.submit()
  File "/usr/lib64/python2.6/site-packages/setroubleshoot/browser.py", line 185, in submit
    bug = withBugzillaDo(filer, lambda b: b.createbug(product=filer.getproduct(),
  File "/usr/lib64/python2.6/site-packages/setroubleshoot/browser.py", line 146, in withBugzillaDo
    retval = fn(bz)
  File "/usr/lib64/python2.6/site-packages/setroubleshoot/browser.py", line 185, in <lambda>
    bug = withBugzillaDo(filer, lambda b: b.createbug(product=filer.getproduct(),
  File "/usr/lib64/python2.6/site-packages/setroubleshoot/filer.py", line 380, in getproduct
    details = self.__withBugzillaDo(lambda b: b.getproducts())
  File "/usr/lib64/python2.6/site-packages/setroubleshoot/filer.py", line 323, in __withBugzillaDo
    retval = fn(self._bz)
  File "/usr/lib64/python2.6/site-packages/setroubleshoot/filer.py", line 380, in <lambda>
    details = self.__withBugzillaDo(lambda b: b.getproducts())
  File "/usr/lib/python2.6/site-packages/bugzilla/base.py", line 369, in getproducts
    self._products = self._getproducts()
  File "/usr/lib/python2.6/site-packages/bugzilla/bugzilla3.py", line 54, in _getproducts
    return r['products']
KeyError: 'products'


<wwoods> dwalsh: ooh. okay, yeah.. the getproducts stuff uses an old rhbz call that may have changed or been lost
<wwoods> can you make sure there's a bug filed so I don't forget about that?
* mnapolis (~mnapolis

Comment 1 Gavin Romig-Koch 2010-01-15 15:42:37 UTC
I suspect that this is the same as https://bugzilla.redhat.com/show_bug.cgi?id=553878

Comment 2 Gavin Romig-Koch 2010-01-15 17:30:45 UTC
if it's of any help, I can get (roughly) the same failure from the 'bugzilla' command on F-11, F-12, and rawhide.  This is from rawhide:

$ bugzilla info --products
Traceback (most recent call last):
  File "/usr/bin/bugzilla", line 595, in <module>
    main()
  File "/usr/bin/bugzilla", line 336, in main
    for k in sorted(bz.products):
  File "/usr/lib/python2.6/site-packages/bugzilla/base.py", line 373, in <lambda>
    products = property(fget=lambda self: self.getproducts(),
  File "/usr/lib/python2.6/site-packages/bugzilla/base.py", line 369, in getproducts
    self._products = self._getproducts()
  File "/usr/lib/python2.6/site-packages/bugzilla/bugzilla3.py", line 54, in _getproducts
    return r['products']
KeyError: 'products'
$

Comment 3 Gavin Romig-Koch 2010-01-16 01:37:58 UTC
Created attachment 384751 [details]
attempted fix

This seems to fix the problem, but may be a completely incorrect fix.  

My theory is that the recent bugzilla upgrade has changed what gets returned by Product.get_products(product_ids), but i don't know that, and i don't have any way to test this.

This patch changes RHBugzilla3::_getproducts() to use bugzilla.getProdInfo just like RHBugzilla::_getproducts() does.

Comment 4 Gavin Romig-Koch 2010-01-16 01:41:25 UTC
Also the Product.get_products() api does not return a description field that the bugzilla.getProdInfo() api does.

Comment 5 Daniel Walsh 2010-01-18 16:15:08 UTC
*** Bug 555975 has been marked as a duplicate of this bug. ***

Comment 6 Will Woods 2010-01-18 16:26:11 UTC
I'm pretty sure this is caused by a bug in the new Bugzilla code - Product.get() is returning different data than the WebServices API docs say it should.

Filed bug 556516 about that.

Comment 7 Elad Alfassa 2010-01-20 13:21:32 UTC
This bug should be marked as critical. SELinux troubleshooting is important for QA, not just for rawhide but for the current release (fedora 12) as well.
Please fix that as soon as possible. There are some SELinux bug i can't report because it doesn't work.

Comment 8 Daniel Walsh 2010-01-20 20:31:59 UTC
Elad, please use the copy button to grab the message and report it the old fashioned way.

Thanks.

Comment 9 Matt Domsch 2010-01-21 03:08:55 UTC
We've got 40 abrt-filed duplicates (cc's on a #555975) and growing by the day.  Any chance this can get resolved soon?

Thanks,
Matt

Comment 10 Noura El hawary 2010-01-21 13:03:38 UTC
Hi,

I have verified this problem, and committed a fix that should be available later on today with the next bugzilla update, so fedora scripts should work again for the function Product.get_products

what happened basically is that upstream had in their previous version of bugzilla  the fucntion Product.get_products which we had also in  RH bugzilla 3.2, and that was the function used by fedora scripts and it was returning the product description, we also had in our RH 3.2 a function we created called Product.get that was returning a structure used by our ajax rpc and upstream didn't have this function. in upstream bugzilla 3.4 they renamed Product.get_products to Product.get and made calling both functions call the same code in the line:
BEGIN { *get_products = \&get }

and that was caused the problem, I added for now Product.get_products as a separate function again to our RH bugzilla 3.4 until we merge the 2 functions. 

Regards,
Noura

Comment 11 Bug Zapper 2010-03-15 13:53:52 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 13 development cycle.
Changing version to '13'.

More information and reason for this action is here:
http://fedoraproject.org/wiki/BugZappers/HouseKeeping

Comment 12 Gavin Romig-Koch 2010-08-13 14:06:20 UTC
Package: setroubleshoot-server-2.2.91-2.fc14
Architecture: x86_64
OS Release: Fedora release 14 (Branched)


How to reproduce
-----
was reporting a selinux problem with setroubleshoot against the test version of bugzilla (partners-bugzilla.redhat.com) to see if it works.  It doesn't.

Comment 13 Gavin Romig-Koch 2010-08-13 14:29:08 UTC
Package: setroubleshoot-server-2.2.91-2.fc14
Architecture: x86_64
OS Release: Fedora release 14 (Branched)


How to reproduce
-----
was reporting a selinux problem with setroubleshoot against the test version of bugzilla (partners-bugzilla.redhat.com) to see if it works.  It doesn't.

Comment 14 Elad Alfassa 2011-05-08 09:01:05 UTC
No activity in this bug for a long time, seems to be fixed. Closing.



-- 
Fedora Bugzappers volunteer triage team
https://fedoraproject.org/wiki/BugZappers


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