Opened 3 years ago
Closed 3 years ago
#3533 closed defect (fixed)
API request handling failure
Reported by: | cmouse | Owned by: | |
---|---|---|---|
Priority: | major | Milestone: | 0.9.0 |
Version: | master | Keywords: | |
Cc: |
Description
I get this in logs occasionally when browsing the Web UI.
2016-04-22 11:25:42+0300 [-] while handling API request
Traceback (most recent call last):
File "/opt/buildbot/local/lib/python2.7/site-packages/twisted/internet/defer.py", line 1126, in _inlineCallbacks
result = result.throwExceptionIntoGenerator(g)
File "/opt/buildbot/local/lib/python2.7/site-packages/twisted/python/failure.py", line 389, in throwExceptionIntoGenerator
return g.throw(self.type, self.value, self.tb)
File "/opt/buildbot/local/lib/python2.7/site-packages/buildbot/www/rest.py", line 407, in renderRest
request.write(data)
File "/usr/lib/python2.7/contextlib.py", line 35, in exit
self.gen.throw(type, value, traceback)
--- <exception caught here> ---
File "/opt/buildbot/local/lib/python2.7/site-packages/buildbot/www/rest.py", line 124, in handleErrors
yield
File "/opt/buildbot/local/lib/python2.7/site-packages/buildbot/www/rest.py", line 339, in renderRest
data = yield ep.get(rspec, kwargs)
File "/opt/buildbot/local/lib/python2.7/site-packages/twisted/internet/defer.py", line 1126, in _inlineCallbacks
result = result.throwExceptionIntoGenerator(g)
File "/opt/buildbot/local/lib/python2.7/site-packages/twisted/python/failure.py", line 389, in throwExceptionIntoGenerator
return g.throw(self.type, self.value, self.tb)
File "/opt/buildbot/local/lib/python2.7/site-packages/buildbot/data/changes.py", line 73, in get
changes = yield self.master.db.changes.getChangesForBuild(buildid)
File "/opt/buildbot/local/lib/python2.7/site-packages/twisted/internet/defer.py", line 1128, in _inlineCallbacks
result = g.send(result)
File "/opt/buildbot/local/lib/python2.7/site-packages/buildbot/db/changes.py", line 196, in getChangesForBuild
if change and changechangeid? != toChanges.get(cb, {}).get('changeid'):
exceptions.AttributeError?: 'NoneType?' object has no attribute 'get'
Change History (4)
comment:1 Changed 3 years ago by rayalan
comment:2 Changed 3 years ago by rayalan
Proposed patch here: https://github.com/buildbot/buildbot/pull/2163.
comment:3 Changed 3 years ago by dustin
- Milestone changed from undecided to 0.9.0
- Type changed from undecided to defect
Setting to 0.9.0 since there's a patch pending
comment:4 Changed 3 years ago by tardyp
- Resolution set to fixed
- Status changed from new to closed
It also happens with building periodically (via rebuild). Problem is in line 196 in buildbot/db/changes.py where the line should read if change and change['changeid'] != (toChanges.get(cb) or {}).get('changeid'): rather than the current if change and change['changeid'] != toChanges.get(cb, {}).get('changeid')
There are a couple ways that the codebase can set to None (such as the toChanges[cb] = {'changeid': None} line on 192), and the line just errors out when those are hit.
I'm working on a patch; the fix is much easier than proving it with a unit test change.