Bug 866281 - Unable to close bugs from python-bugzilla
Summary: Unable to close bugs from python-bugzilla
Keywords:
Status: CLOSED WORKSFORME
Alias: None
Product: Bugzilla
Classification: Community
Component: WebService
Version: 4.2
Hardware: Unspecified
OS: Unspecified
unspecified
urgent
Target Milestone: ---
Assignee: PnT DevOps Devs
QA Contact: tools-bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-10-15 02:08 UTC by Dan Mashal
Modified: 2013-06-24 01:53 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-10-17 11:39:41 UTC
Embargoed:


Attachments (Terms of Use)

Description Dan Mashal 2012-10-15 02:08:14 UTC
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-15 02:13:59 UTC
https://bugzilla.redhat.com/show_bug.cgi?id=860422

Is this still happening to newly filed updates?

Comment 2 Kevin Fenzi 2012-10-15 04:43:55 UTC
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 15:58:14 UTC
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 11:39:41 UTC
It's fixed now.

Comment 5 Jens Petersen 2012-10-18 12:17:28 UTC
(In reply to comment #4)
> It's fixed now.

Really?  Can you give some evidence, before closing?

Comment 6 Jens Petersen 2012-10-19 08:26:33 UTC
Ok here is an example: bug 861922

Comment 7 Till Maas 2012-11-01 17:14:01 UTC
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.