Bug 866281 - Unable to close bugs from python-bugzilla
Unable to close bugs from python-bugzilla
Status: CLOSED WORKSFORME
Product: Bugzilla
Classification: Community
Component: WebService (Show other bugs)
4.2
Unspecified Unspecified
unspecified Severity urgent (vote)
: ---
: ---
Assigned To: PnT DevOps Devs
tools-bugs
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-10-14 22:08 EDT by Dan Mashal
Modified: 2013-06-23 21:53 EDT (History)
6 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-10-17 07:39:41 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Dan Mashal 2012-10-14 22:08:14 EDT
bodhi is not closing/updating bugs as they are pushed to stable. 

https://bugzilla.redhat.com/show_bug.cgi?id=860521
https://bugzilla.redhat.com/show_bug.cgi?id=860515
Comment 1 Jens Petersen 2012-10-14 22:13:59 EDT
https://bugzilla.redhat.com/show_bug.cgi?id=860422

Is this still happening to newly filed updates?
Comment 2 Kevin Fenzi 2012-10-15 00:43:55 EDT
Looks like a bugzilla interface change... 

[bodhi.masher] ERROR 2012-10-15 04:24:17,240 _close_bug() takes exactly 2 arguments (3 given)
Traceback (most recent call last):
  File "/usr/lib/python2.6/site-packages/bodhi/masher.py", line 762, in run
    update.modify_bugs()
  File "/usr/lib/python2.6/site-packages/bodhi/model.py", line 642, in modify_bugs
    self, bug._default_message(self)), self.bugs)
  File "/usr/lib/python2.6/site-packages/bodhi/model.py", line 642, in <lambda>
    self, bug._default_message(self)), self.bugs)
  File "/usr/lib/python2.6/site-packages/bodhi/model.py", line 1518, in close_bug
    bug.close('ERRATA', fixedin=update.builds[0].nvr, comment=comment)
  File "/usr/lib/python2.6/site-packages/bugzilla/base.py", line 1360, in close
    comment,isprivate,private_in_it,nomail)
  File "/usr/lib/python2.6/site-packages/bugzilla/rhbugzilla.py", line 281, in _closebug
    return self._close_bug(id, update)
TypeError: _close_bug() takes exactly 2 arguments (3 given)
Comment 3 Luke Macken 2012-10-15 11:58:14 EDT
This seems like a regression in python-bugzilla and a bug with the new Bugzilla. You can reproduce the issue with:

   bz.getbug(866281).close('ERRATA', comment='testing')

It seems like _close_bugs in rhbugzilla.py should take 'self' as the first argument.

    def _close_bug(id, updates):
        updates['id'] = id

However, once making this change, I then get this server-side error:

    Fault: <Fault Client: 'Failed to locate method (closeBug) in class (Bugzilla::WebService::Bug) at /usr/lib/perl5/vendor_perl/5.8.8/SOAP/Lite.pm line 2837.\n'>

Versions: python-bugzilla-0.7.0-1.el6.noarch
Comment 4 Dan Mashal 2012-10-17 07:39:41 EDT
It's fixed now.
Comment 5 Jens Petersen 2012-10-18 08:17:28 EDT
(In reply to comment #4)
> It's fixed now.

Really?  Can you give some evidence, before closing?
Comment 6 Jens Petersen 2012-10-19 04:26:33 EDT
Ok here is an example: bug 861922
Comment 7 Till Maas 2012-11-01 13:14:01 EDT
The following code works for me with python-bugzilla-0.7.0-1.fc17 to close a bug:

bz._update_bug(861445, {"status": "CLOSED", "resolution": "CURRENTRELEASE"})

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