Bug 1422385
| Summary: | beaker-wizard fails with python-bugzilla 2.0: AttributeError: Bug object has no attribute 'attachments' | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [Retired] Beaker | Reporter: | Martin Kyral <mkyral> | ||||
| Component: | wizard | Assignee: | Dan Callaghan <dcallagh> | ||||
| Status: | CLOSED CURRENTRELEASE | QA Contact: | tools-bugs <tools-bugs> | ||||
| Severity: | unspecified | Docs Contact: | |||||
| Priority: | unspecified | ||||||
| Version: | 23 | CC: | crobinso, dcallagh, mjia, ohudlick, rjoost | ||||
| Target Milestone: | 24.2 | Keywords: | Patch | ||||
| Target Release: | --- | ||||||
| Hardware: | Unspecified | ||||||
| OS: | Unspecified | ||||||
| Whiteboard: | |||||||
| Fixed In Version: | Doc Type: | If docs needed, set a value | |||||
| Doc Text: | Story Points: | --- | |||||
| Clone Of: | Environment: | ||||||
| Last Closed: | 2017-03-30 03:22:57 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: | |||||||
| Attachments: |
|
||||||
|
Description
Martin Kyral
2017-02-15 08:17:49 UTC
Created attachment 1250514 [details]
proposed patch
Wrap "if not bug or not bug.attachments:" in try - except and return False not even if bug.attachments is empty, but also if it is not defined at all.
I suspect some BZ update changed the API so instead of empty attachments attribute there is none now.
With the patch: [mkyral@host pcre (master)]$ bw -byg 1400267 Contacting bugzilla... Fetching details for BZ#1400267 Ready to create the test, please review ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /CoreOS/pcre/Regression/bz1400267-PCRE-8-32-fails-to-recognize-non-ASCII-printable Namespace : CoreOS Package : pcre Test type : Regression It seems the root cause is API breakage in python-buzilla-2.0.0. Hmm yeah I guess it is due to this change, "Bugzilla.bug_autorefresh now defaults to False" as described here: http://blog.wikichoon.com/2016/06/python-bugzilla-api-changes-in-git.html I think it means we need to pass include_fields=[..., 'attachments'] somewhere. We'll have to do QE on the items before we can tag a release. Verified with git build from patchset 5648.
Reproduced error first with install python-bugzilla 2.0 in a virtualenv and invoking beaker-wizard with the python version of the virtualenv:
ยป python /usr/bin/beaker-wizard -byg 1400267
Contacting bugzilla...
Traceback (most recent call last):
File "/usr/bin/beaker-wizard", line 9, in <module>
load_entry_point('beaker-client==24.0', 'console_scripts', 'beaker-wizard')()
[...]
File "/tmp/bwtest/lib/python2.7/site-packages/bugzilla/bug.py", line 110, in __getattr__
raise AttributeError(msg)
AttributeError: Bug object has no attribute 'attachments'.
Previous beaker-client version was 24.0.
Updated to git build from patchset 5648 and redone the test which presents the wizard interface.
*** Bug 1430454 has been marked as a duplicate of this bug. *** Beaker 24.2 has been released. |