Ticket #2305 (closed defect: fixed)
If doStepIf callable errors out build ends badly
| Reported by: | Jc2k | Owned by: | |
|---|---|---|---|
| Priority: | major | Milestone: | 0.8.+ |
| Version: | master | Keywords: | buildstep |
| Cc: |
Description
My callable had the wrong number of arguments so threw a TypeError? inside _maybeEvaluate. The build didn't end cleanly - got stuck in a building state and the build vanished when i restarted.
In this instance, i'm running a snapshot of master from shortly before the big codebases merge with my libvirt patch set applied (that doesn't touch the buildstep code tho).
Change History
comment:3 Changed 12 months ago by dustin
Ah, indeed, I get
2012-05-26 18:35:55-0500 [-] BuildStep.failed; traceback follows
Traceback (most recent call last):
File "/home/dustin/code/buildbot/t/buildbot/sand27/lib/python2.7/site-packages/twisted/internet/defer.py", line 290, in addCallbacks
self._runCallbacks()
File "/home/dustin/code/buildbot/t/buildbot/sand27/lib/python2.7/site-packages/twisted/internet/defer.py", line 551, in _runCallbacks
current.result = callback(current.result, *args, **kw)
File "/home/dustin/code/buildbot/t/buildbot/sand27/lib/python2.7/site-packages/twisted/internet/defer.py", line 368, in callback
self._startRunCallbacks(result)
File "/home/dustin/code/buildbot/t/buildbot/sand27/lib/python2.7/site-packages/twisted/internet/defer.py", line 464, in _startRunCallbacks
self._runCallbacks()
--- <exception caught here> ---
File "/home/dustin/code/buildbot/t/buildbot/sand27/lib/python2.7/site-packages/twisted/internet/defer.py", line 551, in _runCallbacks
current.result = callback(current.result, *args, **kw)
File "/home/dustin/code/buildbot/t/buildbot/master/buildbot/process/buildstep.py", line 636, in finished
self._finishFinished(results)
File "/home/dustin/code/buildbot/t/buildbot/master/buildbot/process/buildstep.py", line 645, in _finishFinished
hidden = self._maybeEvaluate(self.hideStepIf, results, self)
File "/home/dustin/code/buildbot/t/buildbot/master/buildbot/process/buildstep.py", line 758, in _maybeEvaluate
value = value(*args, **kwargs)
exceptions.TypeError: <lambda>() takes no arguments (2 given)
2012-05-26 18:35:55-0500 [-] exception during failure processing
2012-05-26 18:35:55-0500 [-] Unhandled Error
Traceback (most recent call last):
File "/home/dustin/code/buildbot/t/buildbot/sand27/lib/python2.7/site-packages/twisted/internet/defer.py", line 551, in _runCallbacks
current.result = callback(current.result, *args, **kw)
File "/home/dustin/code/buildbot/t/buildbot/sand27/lib/python2.7/site-packages/twisted/internet/defer.py", line 368, in callback
self._startRunCallbacks(result)
File "/home/dustin/code/buildbot/t/buildbot/sand27/lib/python2.7/site-packages/twisted/internet/defer.py", line 464, in _startRunCallbacks
self._runCallbacks()
File "/home/dustin/code/buildbot/t/buildbot/sand27/lib/python2.7/site-packages/twisted/internet/defer.py", line 551, in _runCallbacks
current.result = callback(current.result, *args, **kw)
--- <exception caught here> ---
File "/home/dustin/code/buildbot/t/buildbot/master/buildbot/process/buildstep.py", line 662, in failed
self.progress.finish()
File "/home/dustin/code/buildbot/t/buildbot/master/buildbot/status/progress.py", line 85, in finish
self.buildProgress.stepFinished(self.name)
File "/home/dustin/code/buildbot/t/buildbot/master/buildbot/status/progress.py", line 165, in stepFinished
assert(stepname not in self.finishedSteps)
exceptions.AssertionError:
comment:4 Changed 12 months ago by dustin
That was relatively easy to fix!
Now I get:
(view as text)
Traceback (most recent call last):
File "/home/dustin/code/buildbot/t/buildbot/sand27/lib/python2.7/site-packages/twisted/internet/defer.py", line 368, in callback
self._startRunCallbacks(result)
File "/home/dustin/code/buildbot/t/buildbot/sand27/lib/python2.7/site-packages/twisted/internet/defer.py", line 464, in _startRunCallbacks
self._runCallbacks()
File "/home/dustin/code/buildbot/t/buildbot/sand27/lib/python2.7/site-packages/twisted/internet/defer.py", line 551, in _runCallbacks
current.result = callback(current.result, *args, **kw)
File "/home/dustin/code/buildbot/t/buildbot/master/buildbot/process/buildstep.py", line 636, in finished
self._finishFinished(results)
--- <exception caught here> ---
File "/home/dustin/code/buildbot/t/buildbot/master/buildbot/process/buildstep.py", line 645, in _finishFinished
hidden = self._maybeEvaluate(self.hideStepIf, results, self)
File "/home/dustin/code/buildbot/t/buildbot/master/buildbot/process/buildstep.py", line 766, in _maybeEvaluate
value = value(*args, **kwargs)
exceptions.TypeError: <lambda>() takes no arguments (2 given)
Note: See
TracTickets for help on using
tickets.
![[Buildbot Logo]](/chrome/site/header-text-transparent.png)
Hm, I get an EXCEPTION status from
The exception is ugly, because it's from a DeferredList?, but the state seems to come out correctly.
Can you give some more detail on what you're seeing?