Bug 906781
Summary: | getusers doesn't return user list in the same order as the input list | ||
---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Kamil Páral <kparal> |
Component: | python-bugzilla | Assignee: | Will Woods <wwoods> |
Status: | CLOSED ERRATA | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
Severity: | unspecified | Docs Contact: | |
Priority: | unspecified | ||
Version: | 18 | CC: | crobinso, dzickus, jskarvad, wwoods |
Target Milestone: | --- | ||
Target Release: | --- | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2013-03-22 21:00:36 UTC | Type: | Bug |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
Kamil Páral
2013-02-01 13:31:23 UTC
Really this should be a request against Bugzilla, since we just forward on the data that was returned to us. But it was pretty simple to handle it in python-bugzilla, fixed upstream now: http://git.fedorahosted.org/cgit/python-bugzilla.git/commit/?id=85e93ec63e3fa07b9b0a2a1501589a360c4b5b1b You have to be careful here. As all bugzilla data comes back unordered. getusers is just the tip of the iceberg. Unless you plan on re-arranging all returned data (including bugzillas themselves). Also what about the case where one of the requested users doesn't exist, then bugzilla just drops it. So Cole's solution won't work either. I am not sure the best way to solve this other than sort both lists and compare them individually before printing them. Cheers, Don Yeah I probably should have just said WONTFIX but I was in this area of the code anyways. But I won't honor any requests to reorder data going forward. As far as a requested user not being returned in the list, at least with the way python-bugzilla invokes Users.get(), an exception is thrown if a queried user is not found. But yeah, generally any apps should just assume that the returned data is in random order, as you would if talking straight to xmlrpc. I didn't know this is a "feature" of Bugzilla itself. _But_, could you please at least state in documentation to all methods related to this issue that the returned list is in a random order? That will save many python-bugzilla users from ugly surprises. It is not hard to work around this issue in your code, it is just completely unexpected. python-bugzilla-0.8.0-1.fc18 has been submitted as an update for Fedora 18. https://admin.fedoraproject.org/updates/python-bugzilla-0.8.0-1.fc18 python-bugzilla-0.8.0-2.fc18 has been submitted as an update for Fedora 18. https://admin.fedoraproject.org/updates/python-bugzilla-0.8.0-2.fc18 Package python-bugzilla-0.8.0-2.fc18: * should fix your issue, * was pushed to the Fedora 18 testing repository, * should be available at your local mirror within two days. Update it with: # su -c 'yum update --enablerepo=updates-testing python-bugzilla-0.8.0-2.fc18' as soon as you are able to. Please go to the following url: https://admin.fedoraproject.org/updates/FEDORA-2013-3447/python-bugzilla-0.8.0-2.fc18 then log in and leave karma (feedback). python-bugzilla-0.8.0-2.fc18 has been pushed to the Fedora 18 stable repository. If problems still persist, please make note of it in this bug report. |