[Buildbot-devel] can't figure out exception in new-style steps
Dustin J. Mitchell
dustin at v.igoro.us
Mon Oct 6 02:29:39 UTC 2014
Hm, that's no good. That assertion works fine in nine, where the web
status is gone, but is obviously problematic in eight.
The code will most likely work fine with the assertion removed -- can
you verify that by commenting it out? If so, I'll remove it in the
eight branch. But that kind of leaves new-style steps not working
very well in eight :(
Do you mind filing a bug on http://trac.buildbot.net, too?
Dustin
On Sun, Oct 5, 2014 at 9:23 PM, Vitali <vlovich at gmail.com> wrote:
> Hi,
>
> I'm trying to create a very basic new-style step & I think it might work, but
> the logs throw an exception when I view them.
>
> Can anyone give me a pointer to what I'm doing wrong (I think I'm following
> the manual)?
>
> Buildbot 0.8.9 on OS X with python 2.7
>
> class MyStep(BuildStep, ShellMixin):
> def __init__(self, script, **kwargs):
> self._script = script
> kwargs = self.setupShellMixin(kwargs,prohibitArgs=['command'])
> BuildStep.__init__(self, **kwargs)
>
> @defer.inlineCallbacks
> def run(self):
> cmd = yield self.makeRemoteShellCommand(command=[self._script],
> collectStdout=True,
> collectStderr=True)
> yield self.runCommand(cmd)
> if cmd.didFail():
> defer.returnValue(cmd.results())
> // do something with cmd.stdout
>
> When I add MyStep to my factory, the stdio log file contains the exception below
>
> Thanks,
> Vitali
>
> web.Server Traceback (most recent call last):
> exceptions.AssertionError: not available in new-style steps
> <python framework>/Extras/lib/python/twisted/web/server.py:189 in process
> 188 self._encoder = encoder
> 189 self.render(resrc)
> 190 except:
>
> <python framework>/Extras/lib/python/twisted/web/server.py:238 in render
> 237 try:
> 238 body = resrc.render(self)
> 239 except UnsupportedMethod as e:
>
> <python framework>/Extras/lib/python/twisted/web/resource.py:250 in render
> 249 raise UnsupportedMethod(allowedMethods)
> 250 return m(request)
> 251
>
> <packages>/site-packages/buildbot/status/web/logs.py:140 in render_GET
> 139
> 140 self.original.subscribeConsumer(ChunkConsumer(req, self))
> 141 return server.NOT_DONE_YET
>
> <packages>/buildbot/status/logfile.py:436 in subscribeConsumer
> 435 def subscribeConsumer(self, consumer):
> 436 assert not self._isNewStyle, "not available in new-style steps"
> 437 p = LogFileProducer(self, consumer)
> exceptions.AssertionError: not available in new-style steps
>
>
>
> ------------------------------------------------------------------------------
> Slashdot TV. Videos for Nerds. Stuff that Matters.
> http://pubads.g.doubleclick.net/gampad/clk?id=160591471&iu=/4140/ostg.clktrk
> _______________________________________________
> Buildbot-devel mailing list
> Buildbot-devel at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/buildbot-devel
More information about the devel
mailing list