Bug 887199 - Flags field in Bug.search XMLRPC call broken
Summary: Flags field in Bug.search XMLRPC call broken
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Bugzilla
Classification: Community
Component: WebService
Version: 4.4
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: 4.4-3
Assignee: Matt Tyson 🤬
QA Contact: tools-bugs
URL:
Whiteboard:
Depends On:
Blocks: BZ44
TreeView+ depends on / blocked
 
Reported: 2012-12-14 09:58 UTC by Martin Kosek
Modified: 2018-12-09 06:29 UTC (History)
2 users (show)

Fixed In Version: 4.4-3
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-05-20 11:04:49 UTC
Embargoed:


Attachments (Terms of Use)

Description Martin Kosek 2012-12-14 09:58:47 UTC
Description of problem:

Bug.search XMLRPC call no longer returns bug flags as it used to, but crashes instead:

>>> proxy
<ServerProxy for bzweb01-devel.app.eng.rdu.redhat.com/xmlrpc.cgi>
>>> proxy.Bug.search({'bug_status' : ['POST'],
...                                'product': 'Red Hat Enterprise Linux 6',
...                                'component': 'ipa',
...                                'include_fields': ['id', 'flags',]})

Traceback (most recent call last):
  File "<stdin>", line 4, in <module>
  File "/usr/lib64/python2.7/xmlrpclib.py", line 1224, in __call__
    return self.__send(self.__name, args)
  File "/usr/lib64/python2.7/xmlrpclib.py", line 1578, in __request
    verbose=self.__verbose
  File "/usr/lib64/python2.7/xmlrpclib.py", line 1264, in request
    return self.single_request(host, handler, request_body, verbose)
  File "/usr/lib64/python2.7/xmlrpclib.py", line 1297, in single_request
    return self.parse_response(response)
  File "/home/mkosek/devel/ipatool/bz/proxy.py", line 281, in parse_response
    return xmlrpclib.SafeTransport.parse_response(self, response)
  File "/usr/lib64/python2.7/xmlrpclib.py", line 1473, in parse_response
    return u.close()
  File "/usr/lib64/python2.7/xmlrpclib.py", line 793, in close
    raise Fault(**self._stack[0])
xmlrpclib.Fault: <Fault -32000: "Can't locate Bugzilla/WebService/Flag.pm in @INC (@INC contains: ./extensions CODE(0x3889140) CODE(0x386a1c0) CODE(0x381b170) CODE(0x373a9e8) CODE(0x30e2680) CODE(0x30c5be0) CODE(0x30b8948) CODE(0x307a668) CODE(0x2b03578) CODE(0xebaa98) CODE(0x266ef48) . lib /usr/local/lib64/perl5 /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5) at Bugzilla/WebService/Bug.pm line 1268.\n">


This is what I get in current production Bugzilla:
>>> print proxy.Bug.search({'bug_status' : ['POST'],
...                                'product': 'Red Hat Enterprise Linux 6',
...                                'component': 'ipa',
...                                'include_fields': ['id', 'flags',]})
{'bugs': [{'flags': [{'status': '?', 'name': 'requires_doc_text', 'modification_date': <DateTime '20121130T13:59:36' at 2b776c8>, 'type_id': 415, 'creation_date': <DateTime '20121130T09:49:44' at 2b77710>, 'id': 1202506, 'setter': 'bugzilla'}, {'status': '+', 'name': 'requires_release_note', 'modification_date': <DateTime '20121210T16:20:38' at 2b77758>, 'type_id': 60, 'creation_date': <DateTime '20121204T16:48:14' at 2b777a0>, 'id': 1205361, 'setter': 'mprpic'}, {'status': '?', 'name': 'rhel-6.4.0', 'modification_date': <DateTime '20121101T14:22:06' at 2b777e8>, 'type_id': 326, 'creation_date': <DateTime '20121101T14:22:06' at 2b77830>, 'id': 1178069, 'setter': 'rcritten'}, {'status': '?', 'name': 'blocker', 'modification_date': <DateTime '20121101T14:22:39' at 2b77878>, 'type_id': 24, 'creation_date': <DateTime '20121101T14:22:39' at 2b778c0>, 'id': 1178071, 'setter': 'pm-rhel'}, {'status': '+', 'name': 'pm_ack', 'modification_date': <DateTime '20121114T14:44:15' at 2b77908>, 'type_id': 11, 'creation_date': <DateTime '20120427T15:46:38' at 2b77950>, 'id': 1038078, 'setter': 'syeghiay'}, {'status': '+', 'name': 'devel_ack', 'modification_date': <DateTime '20121101T14:22:06' at 2b77998>, 'type_id': 10, 'creation_date': <DateTime '20121101T14:22:06' at 2b779e0>, 'id': 1178070, 'setter': 'rcritten'}, {'status': '?', 'name': 'qa_ack', 'modification_date': <DateTime '20121101T14:27:39' at 2b77ab8>, 'type_id': 9, 'creation_date': <DateTime '20121101T14:27:39' at 2b77a70>, 'id': 1178072, 'setter': 'pm-rhel'}], 'id': 817080}]}

Version-Release number of selected component (if applicable):
4.4.rc1.b01

How reproducible:

Steps to Reproduce:
1. See above
2.
3.
  
Actual results:
Call crashes.

Expected results:
id and flag fields are returned.

Additional info:

Comment 1 Martin Kosek 2012-12-14 11:55:20 UTC
I just found out, that XMLRPC call

>>> proxy.Bug.get({'ids': ids, 'include_fields': ['id', 'flags']})

also crashes...

Comment 4 Martin Kosek 2013-01-02 12:50:05 UTC
Thanks for the fix.

Can I test/preview the fixed Bugzilla instance anywhere? The old instance (bzweb01-devel.app.eng.rdu.redhat.com) still contains this regression.


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