Bug 1297637

Summary: python-bugzilla: switch default to bug_autorefresh=False
Product: [Fedora] Fedora Reporter: Matt Tyson 🤬 <mtyson>
Component: python-bugzillaAssignee: Cole Robinson <crobinso>
Status: CLOSED NEXTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 24CC: 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: 2017-02-08 19:53:35 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Description Matt Tyson 🤬 2016-01-12 04:46:14 UTC
When bugzilla is accessed via XML-RPC, it will strip fields from the response if they contain a NULL value [1].

One example of this is the 'deadline' field.  If there is no data in the field, it will be absent from the response.

When python-bugzilla doesn't receive a field it expects, it seems to go and query the bug again.  This can cause a problem when doing a bug search as python-bugzilla will spend a great deal of time querying every bug again for a field that it will never receive.


[1] https://www.bugzilla.org/docs/4.4/en/html/api/Bugzilla/WebService/Server/XMLRPC.html#Undefined_Values

Comment 1 Cole Robinson 2016-01-12 18:15:23 UTC
Thanks for the report, I didn't know that about NULL fields.

The pybz behavior has been around forever, and is convenient as a one off but is really prone to misuse as you point out. In pybz 1.1.0 I added a bug_autorefresh value to turn this off, but code needs to opt in:

http://blog.wikichoon.com/2014/06/python-bugzilla-110-released.html

I think for the next release I'll flip the default to 'off', but I'll need to make some noise about it first and add better docs. We can use this bug to track that change.

Comment 2 Jan Kurik 2016-02-24 14:16:02 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 24 development cycle.
Changing version to '24'.

More information and reason for this action is here:
https://fedoraproject.org/wiki/Fedora_Program_Management/HouseKeeping/Fedora24#Rawhide_Rebase

Comment 3 Cole Robinson 2016-05-25 23:40:48 UTC
This is changed in git now. And I sent an email announcing the semantic change, and some other API breaks:

https://lists.fedorahosted.org/archives/list/python-bugzilla@lists.fedorahosted.org/thread/WCYPOKJZFYOW7RRT44FCM5GQU26O56K4/

Comment 4 Cole Robinson 2017-02-08 19:53:35 UTC
python-bugzilla 2.0.0 is queued for f24+ now. Might let it bake in updates-testing for a while though