Bug 1329590 - The return of Product.get lost components value and product name item
Summary: The return of Product.get lost components value and product name item
Keywords:
Status: CLOSED NEXTRELEASE
Alias: None
Product: Bugzilla
Classification: Community
Component: WebService
Version: 5.0
Hardware: Unspecified
OS: Unspecified
high
high vote
Target Milestone: 5.0
Assignee: Matt Tyson 🤬
QA Contact: tools-bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-04-22 10:01 UTC by Rony Gong 🔥
Modified: 2018-12-09 06:29 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-05-30 22:31:47 UTC


Attachments (Terms of Use)

Description Rony Gong 🔥 2016-04-22 10:01:08 UTC
Description of problem:
The return of Product.get lost components value and product name item

Version-Release number of selected component (if applicable):
5.0.2.rh4

How reproducible:
100%

Steps to Reproduce:
1. Try to the product info of Bugzilla by xmlrpc
xmlrpc.Product.get({'ids': [35], 'Bugzilla_login': 'redhat1', 'Bugzilla_password': '******'}) 
2.
3.

Actual results:

{'products': [{'classification': 'Community', 'components': [{}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}], 'default_milestone': '---', 'default_release': '---', 'has_unconfirmed': False, 'milestones': [{'id': 70, 'is_active': True, 'name': '---', 'sort_key': 0}, {'id': 2144, 'is_active': False, 'name': 'disabled', 'sort_key': 11}], 'releases': [{}, {}], 'versions': [{'id': 19, 'is_active': False, 'name': '1.0', 'sort_key': 0}, {'id': 162, 'is_active': False, 'name': '2.1r', 'sort_key': 0}, {'id': 163, 'is_active': False, 'name': '2.1rC', 'sort_key': 0}, {'id': 177, 'is_active': False, 'name': '2.8', 'sort_key': 0}, {'id': 153, 'is_active': False, 'name': '2.17', 'sort_key': 0}, {'id': 157, 'is_active': False, 'name': '2.18', 'sort_key': 0}, {'id': 229, 'is_active': False, 'name': '3.2', 'sort_key': 0}, {'id': 806, 'is_active': False, 'name': '3.4', 'sort_key': 0}, {'id': 880, 'is_active': False, 'name': '3.6', 'sort_key': 0}, {'id': 2102, 'is_active': False, 'name': '4.2', 'sort_key': 0}, {'id': 2321, 'is_active': True, 'name': '4.4', 'sort_key': 0}, {'id': 3035, 'is_active': True, 'name': '4.5', 'sort_key': 0}, {'id': 439, 'is_active': False, 'name': 'devel', 'sort_key': 0}]}]}

Expected results:
It should include product name and components

Additional info:

Comment 1 Matt Tyson 🤬 2016-05-04 03:32:08 UTC
Can you attach your whole python script please? I can't reproduce it on my end.

Comment 2 Rony Gong 🔥 2016-05-04 06:01:54 UTC
(In reply to Matt Tyson from comment #1)
> Can you attach your whole python script please? I can't reproduce it on my
> end.
After retest this on 5.0.2.rh5, the output changed:
Steps:
1. open the python line command by: execute  python
2. Then input below one by one, note that redhat1 only belongs to group 'redhat'.

>>> import xmlrpclib;
>>> proxy = xmlrpclib.ServerProxy('https://bz-web.host.qe.eng.pek2.redhat.com/xmlrpc.cgi');
>>> proxy.Product.get({'ids': [35], 'Bugzilla_login': 'redhat1', 'Bugzilla_password': '******'})
Traceback (most recent call last):
  File "<stdin>", line 1, 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 "/usr/lib64/python2.7/xmlrpclib.py", line 1467, in parse_response
    p.feed(data)
  File "/usr/lib64/python2.7/xmlrpclib.py", line 557, in feed
    self._parser.Parse(data, 0)
  File "/usr/lib64/python2.7/xmlrpclib.py", line 823, in end
    return f(self, join(self._data, ""))
  File "/usr/lib64/python2.7/xmlrpclib.py", line 890, in end_struct
    dict[_stringify(items[i])] = items[i+1]
  File "/usr/lib64/python2.7/xmlrpclib.py", line 183, in _stringify
    return string.encode("ascii")
AttributeError: 'bool' object has no attribute 'encode'


And it works well on BZ4.4, the output is attachment

Comment 4 Matt Tyson 🤬 2016-05-05 23:09:09 UTC
There was a bug in the way sub components was specifying how to encode an xmlrpc datatype.  This caused the XMLRPC decode to fail.

Comment 5 Rony Gong 🔥 2016-05-16 09:37:59 UTC
Tested on
QA environment(5.0.2-rh7)
Result: Pass


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