Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bodhi sometimes puts too much text in the Bugzilla Fixed in Version field #1430

Closed
bowlofeggs opened this Issue Apr 11, 2017 · 4 comments

Comments

Projects
None yet
2 participants
@bowlofeggs
Copy link
Member

commented Apr 11, 2017

bodhi-backend01 emitted an error e-mail yesterday due to putting too much text into the Fixed in Version field in Bugzilla:

Message
-------
[2017-04-10 21:20:21][     bodhi   ERROR]
python
Unable to close bug #1246113

Process Details

  • host: bodhi-backend01.phx2.fedoraproject.org
  • PID: 64964
  • name: fedmsg-hub
  • command: /usr/bin/python /usr/bin/fedmsg-hub
  • msg_id:

Callstack that lead to the logging statement

python
  File "/usr/lib64/python2.7/threading.py", line 777 in __bootstrap
    self.__bootstrap_inner()
  File "/usr/lib64/python2.7/threading.py", line 804 in __bootstrap_inner
    self.run()
  File "/usr/lib/python2.7/site-packages/bodhi/server/consumers/masher.py", line 260 in run
    self.work()
  File "/usr/lib/python2.7/site-packages/bodhi/server/consumers/masher.py", line 351 in work
    self.modify_bugs()
  File "/usr/lib/python2.7/site-packages/bodhi/server/consumers/masher.py", line 57 in wrapper
    retval = method(self, *args, **kwargs)
  File "/usr/lib/python2.7/site-packages/bodhi/server/consumers/masher.py", line 811 in modify_bugs
    update.modify_bugs()
  File "/usr/lib/python2.7/site-packages/bodhi/server/models.py", line 1373 in modify_bugs
    bug.close_bug(self)
  File "/usr/lib/python2.7/site-packages/bodhi/server/models.py", line 2232 in close_bug
    bugs.bugtracker.close(self.bug_id, versions=versions, comment=self.default_message(update))
  File "/usr/lib/python2.7/site-packages/bodhi/server/bugs.py", line 145 in close
    log.exception("Unable to close bug #%d" % bug_id)

Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/bodhi/server/bugs.py", line 143, in close
    bug.close('ERRATA', **args)
  File "/usr/lib/python2.7/site-packages/bugzilla/bug.py", line 219, in close
    return self.bugzilla.update_bugs(self.bug_id, vals)
  File "/usr/lib/python2.7/site-packages/bugzilla/base.py", line 1264, in update_bugs
    return self._proxy.Bug.update(tmp)
  File "/usr/lib64/python2.7/xmlrpclib.py", line 1243, in __call__
    return self.__send(self.__name, args)
  File "/usr/lib/python2.7/site-packages/bugzilla/base.py", line 168, in _ServerProxy__request
    ret = ServerProxy._ServerProxy__request(self, methodname, params)
  File "/usr/lib64/python2.7/xmlrpclib.py", line 1602, in __request
    verbose=self.__verbose
  File "/usr/lib/python2.7/site-packages/bugzilla/base.py", line 259, in request
    return self._request_helper(url, request_body)
  File "/usr/lib/python2.7/site-packages/bugzilla/base.py", line 245, in _request_helper
    raise sys.exc_info()[1]
Fault: <Fault 104: 'The text you entered in the Fixed In Version field is too long (259 characters, above the maximum length allowed of 255 characters).'>

We should check for this max length, and probably should just leave off some NVRs if we are exceeding the length.

@jwnx

This comment has been minimized.

Copy link

commented Jul 29, 2017

Hey @bowlofeggs ! Should this verification be made in the Masher or in Models? (:

@bowlofeggs

This comment has been minimized.

Copy link
Member Author

commented Jul 29, 2017

Hi @jwnx,

I think this is probably the right place to fix it, so it will be fixed no matter what part of Bodhi uses it:

https://github.com/fedora-infra/bodhi/blob/2.8.1/bodhi/server/bugs.py#L133-L147

@jwnx

This comment has been minimized.

Copy link

commented Jul 29, 2017

I see. Thanks, @bowlofeggs !

Since you suggested to leave some NVRs, my first thought was to check if the adittion of a new version would break the 255 character mark and leave it off if it would. But there is a statement in the code for how this field should be formatted, so maybe there is a preference for inclusion of some NVRs.

Do you think we need a more speciffic rule or the 'over 255' is sufficient? (:

@bowlofeggs

This comment has been minimized.

Copy link
Member Author

commented Jul 30, 2017

@jwnx I think just putting as many complete NVRs as we can fit while staying under 256 chars will do.

mattiaverga added a commit to mattiaverga/bodhi that referenced this issue Feb 20, 2018

mattiaverga added a commit to mattiaverga/bodhi that referenced this issue Mar 2, 2018

Make sure fixedin field is lower than 256 chars.
fixes fedora-infra#1430

Check it's lower than 255 not considering space

Signed-off-by: Mattia Verga <mattia.verga@tiscali.it>

bowlofeggs added a commit that referenced this issue Mar 9, 2018

Make sure fixedin field is lower than 256 chars (#2165)
* Make sure fixedin field is lower than 256 chars.

fixes #1430

Signed-off-by: Mattia Verga <mattia.verga@tiscali.it>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.