[Buildbot-devel] problems with SVNPoller and branches

Andrew Lawrence andrew at parascale.com
Wed Apr 29 03:55:47 UTC 2009


I am, indeed, using some Nightly schedulers as well.  Changing line 601 in
scheduler.py from %d to %s as you suggested fixed the problem (after I
sorted through a few other configuration issues I'd missed), and everything
appears to be working correctly.


thanks for your help,
--Andrew

On Tue, Apr 28, 2009 at 6:04 AM, Bailey, Darragh <dbailey at hp.com> wrote:

>
>
>
> > -----Original Message-----
> > From: Andrew Lawrence [mailto:andrew at parascale.com]
> > Sent: 28 April 2009 02:12
> > To: buildbot-devel at lists.sourceforge.net
> > Subject: [Buildbot-devel] problems with SVNPoller and branches
> >
> > I have an existing buildbot configuration that I'm attempting
> > to update to watch multiple branches.  We're using Subversion
> > for our source control, and our source repository is laid out
> > just like the first example in the documentation for
> > SVNPoller (project/branchname/filepath).  My old change
> > source and scheduler look like this:
> >
> > c['change_source'] =
> > SVNPoller(svnurl="svn+ssh://buildbot@<hostname
> > deleted>/data/svn/dev/sm40/trunk")
> >
> > c['schedulers'].append(Scheduler(name="all", branch=None,
> >                                  treeStableTimer=5*60,
> >                                  builderNames=["full-linux-32bit"]))
> >
> > I'm trying to change from that to this:
> >
> > c['change_source'] =
> > SVNPoller(svnurl="svn+ssh://buildbot@<hostname
> > deleted>/data/svn/dev/sm40/", split_file=split_file_branches)
> >
> > c['schedulers'].append(Scheduler(name="all", branch="trunk",
> >                                  treeStableTimer=5*60,
> >                                  builderNames=["full-linux-32bit"]))
> > c['schedulers'].append(Scheduler(name="sp2", branch="branches/ga_sp2",
> >                                  treeStableTimer=5*60,
> >                                  builderNames=["branch-sp2-32bit"]))
> >
> >
> > The old version was working.  When I try the new version, it
> > sees source checkins, but does not realize that they're part
> > of the branches I'm interested in ("trunk" and
> > "branches/ga_sp2"), so no builds are started.  I see this
> > error in twistd.log:
> >
> > 2009-04-27 16:30:07-0700 [-] SVNPoller polling
> > 2009-04-27 16:30:08-0700 [-] svnPoller: _process_changes 5020 .. 5022
> > 2009-04-27 16:30:08-0700 [-] Adding change revision 5021
> > 2009-04-27 16:30:08-0700 [-] Adding change revision 5022
> > 2009-04-27 16:30:08-0700 [-] adding change, who andrew, 2
> > files, rev=5021, branch=None, comments Checkin buildbot's SP2
> > test config files.
> >
> >         , category None
> > 2009-04-27 16:30:08-0700 [-] <Scheduler 'all' at -1214846420>
> > ignoring off-branch <buildbot.changes.changes.Change instance
> > at 0x8958f2c>
> > 2009-04-27 16:30:08-0700 [-] <Scheduler 'sp2' at -1214845940>
> > ignoring off-branch <buildbot.changes.changes.Change instance
> > at 0x8958f2c>
> > 2009-04-27 16:30:08-0700 [-] SVNPoller failed
> > 2009-04-27 16:30:08-0700 [-] _finished : [Failure instance:
> > Traceback: exceptions.TypeError: int argument required
> >
> > /usr/lib/python2.4/site-packages/twisted/internet/defer.py:312
> > :_startRunCallbacks
> >
> > /usr/lib/python2.4/site-packages/twisted/internet/defer.py:328
> > :_runCallbacks
> >
> > /usr/lib/python2.4/site-packages/twisted/internet/defer.py:289
> > :_continue
> >
> > /usr/lib/python2.4/site-packages/twisted/internet/defer.py:285:unpause
> >         --- <exception caught here> ---
> >
> > /usr/lib/python2.4/site-packages/twisted/internet/defer.py:328
> > :_runCallbacks
> >
> > /usr/lib/python2.4/site-packages/buildbot/changes/svnpoller.py
> > :449:submit_changes
> >
> > /usr/lib/python2.4/site-packages/buildbot/changes/changes.py:2
> > 24:addChange
> >
> > /usr/lib/python2.4/site-packages/buildbot/master.py:926:addChange
> >
> > /usr/lib/python2.4/site-packages/buildbot/scheduler.py:601:addChange
> >         ]
> >
> >
> > Is there something I'm doing wrong in the configuration, or
> > is this a bug?
> >
>
> The supposed line that it is failing on is the following log.msg:
>    def addChange(self, change):
>        if  self.onlyIfChanged:
>            if change.branch != self.branch:
>                log.msg("Nightly Scheduler <%s>: ignoring change %d on
> off-branch %s" % (self.name, change.revision, change.branch))
>
> See
> http://github.com/djmitche/buildbot/blob/951a6e2d234b4999aee0070bcfe20c83a38ace6f/buildbot/scheduler.py#L601
>
> This is however in the "Nightly" scheduler in 0.7.10p1, and the only thing
> I can thing of, is that somehow 'change.revision' is being set to something
> that cannot be converted to an int. Btw, are you using the Nightly scheduler
> class elsewhere in the config perhaps? Otherwise I'm scratching my head as
> to how it got to this line of code, unless there is some other way it's
> falling through.
>
> Only thing I could suggest is that perhaps you make a temporary change to
> this line to use %s instead of %d and see what pops out.
>
> The reason I suggest this, is because looking at the following message:
> > 2009-04-27 16:30:08-0700 [-] adding change, who andrew, 2
> > files, rev=5021, branch=None, comments Checkin buildbot's SP2
> > test config files.
> >
> >         , category None
>
> And the code behind it:
>    def addChange(self, change):
>        """Deliver a file change event. The event should be a Change object.
> This method will timestamp the object as it is received."""
>        log.msg("adding change, who %s, %d files, rev=%s, branch=%s, "
>                "comments %s, category %s" % (change.who, len(change.files),
>                                              change.revision,
> change.branch,
>                                              change.comments,
> change.category))
>
> See
> http://github.com/djmitche/buildbot/blob/951a6e2d234b4999aee0070bcfe20c83a38ace6f/buildbot/changes/changes.py#L216
>
>
> The revision here is treated as a string, so perhaps it is a bug, and the
> revision should be getting treated as a string in the code above as well.
>
> --
> Regards,
> Darragh Bailey
>
> Systems Software Engineer
> Hewlett Packard Galway Ltd.
>
> Postal Address:    Hewlett Packard Galway Limited, Ballybrit Business Park,
> Galway
> Registered Office: Hewlett Packard Galway Limited, 63-74 Sir John
> Rogerson's Quay Dublin 2
> Registered Number: 361933
> >
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://buildbot.net/pipermail/devel/attachments/20090428/dec24325/attachment.html>


More information about the devel mailing list