[Buildbot-devel] Renderable locks in 0.8.8
Thomas Middeldorp
thomas at ranzer.geek.nz
Tue Jun 9 01:31:21 UTC 2015
Right ok, from your comments I wasn't sure how confident you were that it
was actually the test that was broken. I will give the current
implementation a try and report back if I run into any other problems.
Thanks again,
Thomas
On 9 June 2015 at 12:25, Vitali Lovich <vlovich at gmail.com> wrote:
> That is just a breakage in the test itself not in the implementation.
>
> -Vitali
>
> On Jun 8, 2015, at 5:00 PM, Thomas Middeldorp <thomas at ranzer.geek.nz>
> wrote:
>
> Ah, I had assumed all classes implicitly extend object. Thanks for finding
> this!
>
> I see there is still a problem with one of the tests in that pull request.
> I'm trying to figure out what could be causing that now (although I'm a
> little out of my depth, so help is still appreciated).
>
> - Thomas
>
>
> On 8/06/2015 10:51 p.m., Vitali Lovich wrote:
>
> Found the problem.
> Pull request updated: https://github.com/buildbot/buildbot/pull/1711
>
> Here’s the patch you need. Pretty simple:
>
> git show -p 4cb7c03bac475b2597d7df9ed94a3a165314351c
> commit 4cb7c03bac475b2597d7df9ed94a3a165314351c
> Author: Vitali Lovich <lovich at apple.com <mailto:lovich at apple.com
> <lovich at apple.com>>>
> Date: Mon Jun 8 03:47:56 2015 -0700
>
> Make ComparableMixin extend from object
>
> Backport change in 89365c81 (merged in 'Merge branch 'pull1100' into
> nine') that makes it so that allows LockAccess to be renderable.
>
> diff --git a/master/buildbot/util/__init__.py
> b/master/buildbot/util/__init__.py
> index 55ef96e..4c95c0a 100644
> --- a/master/buildbot/util/__init__.py
> +++ b/master/buildbot/util/__init__.py
> @@ -77,7 +77,7 @@ def formatInterval(eta):
> return ", ".join(eta_parts)
>
>
> -class ComparableMixin:
> +class ComparableMixin(object):
>
> compare_attrs = []
>
> On Jun 8, 2015, at 2:49 AM, Vitali Lovich <vlovich at gmail.com
> <mailto:vlovich at gmail.com <vlovich at gmail.com>>> wrote:
>
> Phew. I see the same error when I backport the change. So it does
> look like something is missing from eight that makes this work on nine.
> Let me see if I can figure out a fix.
>
> On Jun 8, 2015, at 2:43 AM, Thomas Middeldorp <thomas at ranzer.geek.nz
> <mailto:thomas at ranzer.geek.nz <thomas at ranzer.geek.nz>>> wrote:
>
> I haven't tried the unit tests yet - the exception from my last email
> is from a regular lock. I haven't made any changes to master.cfg yet,
> I figured I would see if I can get it to work with normal locks
> before I tried it with an actual renderable. I still haven't been
> able to figure out why the normal lock isn't being handled by
> _DefaultRenderer though. Any thoughts?
>
> - Thomas
>
> On 8 June 2015 at 21:34, Vitali Lovich <vlovich at gmail.com
> <mailto:vlovich at gmail.com <vlovich at gmail.com>>> wrote:
>
> Do the unit tests pass with your changes? That would be my
> starting point. I’ve been meaning to backport this to eight but
> I haven’t tried.
> Hopefully I didn’t accidentally break anything.
>
> Is it just renderable locks that aren’t working or are regular
> locks broken too?
>
> > On Jun 7, 2015, at 11:33 PM, Thomas Middeldorp
> <thomas at ranzer.geek.nz <mailto:thomas at ranzer.geek.nz
> <thomas at ranzer.geek.nz>>> wrote:
> >
> > Hi,
> >
> > I'm trying to figure out how to implement renderable locks in
> 0.8.8, after seeing the feature was recently added to the master
> git version.
> >
> > So far I've tried adding the changes from commits
> 83bf42c098da83d6e54746ed9c5cef5274749088 and
> 1444e324f4b032365029f0128a3d0af874b61b46 (as well as changing
> startStep to use inline callbacks) but all it's got me is the
> following error when trying to start a build:
> >
> > 2015-06-07 23:11:16+1200 [-] <Build
> asset-tests-linux-incr>.startBuild
> > 2015-06-07 23:11:17+1200 [-] <Build
> asset-tests-linux-incr>.buildException
> > 2015-06-07 23:11:17+1200 [-] Unhandled Error
> > Traceback (most recent call last):
> > File
> "/usr/lib/python2.7/dist-packages/twisted/internet/defer.py",
> line 1039, in _inlineCallbacks
> > result = g.send(result)
> > File
>
> "/home/buildmaster/buildbot_devel/local/lib/python2.7/site-packages/buildbot-0.8.8-py2.7.egg/buildbot/process/buildstep.py",
> line 527, in startStep
> > self.locks = yield self.build.render(self.locks)
> > File
>
> "/home/buildmaster/buildbot_devel/local/lib/python2.7/site-packages/buildbot-0.8.8-py2.7.egg/buildbot/process/properties.py",
> line 191, in render
> > return props.render(value)
> > File
>
> "/home/buildmaster/buildbot_devel/local/lib/python2.7/site-packages/buildbot-0.8.8-py2.7.egg/buildbot/process/properties.py",
> line 151, in render
> > return
> defer.maybeDeferred(renderable.getRenderingFor, self)
> > --- <exception caught here> ---
> > File
> "/usr/lib/python2.7/dist-packages/twisted/internet/defer.py",
> line 134, in maybeDeferred
> > result = f(*args, **kw)
> > File
>
> "/home/buildmaster/buildbot_devel/local/lib/python2.7/site-packages/buildbot-0.8.8-py2.7.egg/buildbot/process/properties.py",
> line 651, in getRenderingFor
> > return defer.gatherResults([ build.render(e) for e
> in self.value ])
> > File
>
> "/home/buildmaster/buildbot_devel/local/lib/python2.7/site-packages/buildbot-0.8.8-py2.7.egg/buildbot/process/properties.py",
> line 150, in render
> > renderable = IRenderable(value)
> > exceptions.TypeError: ('Could not adapt',
> <buildbot.locks.LockAccess instance at 0x351c320>,
> <InterfaceClass buildbot.interfaces.IRenderable>)
> >
> > I'm having trouble figuring out what has actually changed since
> 0.8.8 that allows this to work in master. As far as I can tell
> 0.8.8 already has _DefaultRenderer registered for the object
> type, which I would have thought would allow this to adapt. Does
> anyone know what I'm missing? I'm hoping this doesn't depend on a
> significant refactor as I'd really like to have this feature in
> 0.8.8.
> >
> > Thanks,
> > Thomas
> >
> >
>
> ------------------------------------------------------------------------------
> > _______________________________________________
> > Buildbot-devel mailing list
> > Buildbot-devel at lists.sourceforge.net
> <mailto:Buildbot-devel at lists.sourceforge.net
> <Buildbot-devel at lists.sourceforge.net>>
> > https://lists.sourceforge.net/lists/listinfo/buildbot-devel
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://buildbot.net/pipermail/devel/attachments/20150609/58111a2c/attachment.html>
More information about the devel
mailing list