buildbot_travis
buildbot_travis copied to clipboard
internal error during handling of ValidationError in forced build.
I have set up a buildbot-travis, and configured a single worker and the buildbot project via the web interface. Clicking on the force build button results in an "internal error" indication with a hint to "look into the logs" (the message could be a bit clearer, as it isn't clear what log file to log at).
The master/twistd.log file contains this traceback:
2019-02-08 10:12:48-0500 [-] buildbot.schedulers.forcesched.ValidationError: username: please fill in email address in the form 'User <[email protected]>'
2019-02-08 10:12:48-0500 [-] While rendering resource:
Traceback (most recent call last):
File "/home/stefan/bbtravis/sandbox/lib/python3.6/site-packages/twisted/internet/defer.py", line 1475, in gotResult
_inlineCallbacks(r, g, status)
File "/home/stefan/bbtravis/sandbox/lib/python3.6/site-packages/twisted/internet/defer.py", line 1464, in _inlineCallbacks
status.deferred.errback()
File "/home/stefan/bbtravis/sandbox/lib/python3.6/site-packages/twisted/internet/defer.py", line 501, in errback
self._startRunCallbacks(fail)
File "/home/stefan/bbtravis/sandbox/lib/python3.6/site-packages/twisted/internet/defer.py", line 568, in _startRunCallbacks
self._runCallbacks()
--- <exception caught here> ---
File "/home/stefan/bbtravis/sandbox/lib/python3.6/site-packages/twisted/internet/defer.py", line 654, in _runCallbacks
current.result = callback(current.result, *args, **kw)
File "/home/stefan/bbtravis/sandbox/lib/python3.6/site-packages/buildbot/www/resource.py", line 96, in failHttpError
f.trap(Error)
File "/home/stefan/bbtravis/sandbox/lib/python3.6/site-packages/twisted/python/failure.py", line 439, in trap
self.raiseException()
File "/home/stefan/bbtravis/sandbox/lib/python3.6/site-packages/twisted/python/failure.py", line 467, in raiseException
raise self.value.with_traceback(self.tb)
File "/home/stefan/bbtravis/sandbox/lib/python3.6/site-packages/twisted/internet/defer.py", line 654, in _runCallbacks
current.result = callback(current.result, *args, **kw)
File "/home/stefan/bbtravis/sandbox/lib/python3.6/site-packages/buildbot/www/resource.py", line 89, in failHttpRedirect
f.trap(Redirect)
File "/home/stefan/bbtravis/sandbox/lib/python3.6/site-packages/twisted/python/failure.py", line 439, in trap
self.raiseException()
File "/home/stefan/bbtravis/sandbox/lib/python3.6/site-packages/twisted/python/failure.py", line 467, in raiseException
raise self.value.with_traceback(self.tb)
File "/home/stefan/bbtravis/sandbox/lib/python3.6/site-packages/twisted/internet/defer.py", line 1416, in _inlineCallbacks
result = result.throwExceptionIntoGenerator(g)
File "/home/stefan/bbtravis/sandbox/lib/python3.6/site-packages/twisted/python/failure.py", line 491, in throwExceptionIntoGenerator
return g.throw(self.type, self.value, self.tb)
File "/home/stefan/bbtravis/sandbox/lib/python3.6/site-packages/buildbot/www/rest.py", line 522, in asyncRender
res = yield self.renderJsonRpc(request)
File "/home/stefan/bbtravis/sandbox/lib/python3.6/site-packages/twisted/internet/defer.py", line 1416, in _inlineCallbacks
result = result.throwExceptionIntoGenerator(g)
File "/home/stefan/bbtravis/sandbox/lib/python3.6/site-packages/twisted/python/failure.py", line 491, in throwExceptionIntoGenerator
return g.throw(self.type, self.value, self.tb)
File "/home/stefan/bbtravis/sandbox/lib/python3.6/site-packages/buildbot/www/rest.py", line 251, in renderJsonRpc
request.write(data)
File "/usr/lib/python3.6/contextlib.py", line 99, in __exit__
self.gen.throw(type, value, traceback)
File "/home/stefan/bbtravis/sandbox/lib/python3.6/site-packages/buildbot/www/rest.py", line 155, in handleErrors
writeError(msg, errcode=400, jsonrpccode=e.jsonrpccode)
File "/home/stefan/bbtravis/sandbox/lib/python3.6/site-packages/buildbot/www/rest.py", line 217, in writeError
msg = bytes2unicode(msg)
File "/home/stefan/bbtravis/sandbox/lib/python3.6/site-packages/buildbot/util/__init__.py", line 227, in bytes2unicode
return text_type(x, encoding, errors)
builtins.TypeError: decoding to str: need a bytes-like object, dict found
(As a side-note: clicking the forcebuild button yields a form to fill out with "user name" and "reason". If the username needs to have the form "User email@address", it would be useful to make that clear in the form itself.)