[Buildbot-devel] Multiple change sources and scheduler issues

Steve James ste at cpan.org
Tue Jul 1 14:40:36 UTC 2008


On Tuesday 01 July 2008, Duncan Ferguson wrote:
> Hiya,
>
> I have set up my buildbot v0.77 with a number of change sources and
> Schedulers.  The problem I have is that when a change is detected all
> schedulers are triggered, not just the one configured for the
> particular svn repository.
>
> Triggering all the schedulers hits hard - I am currently monitoring 15
> SVN repositories which build on 10 different os and arch
> combinations.  If I set up Nightlies instead I am building packages
> every night that might not have been changed in a few weeks, so its
> unnecessary work.  Setting up the builds as manually triggered doesn't
> make the best use of buildbot and wont necessarily pick up on bad
> commits until the packages are needed (and then its a scrabble to get
> the issue sorted).
>
> Below is a cut down example of how I have set this up (I don't know
> python at all so the below might not be as efficient as it could be)
> but I hope with will give enough insight - what am I missing or what
> have I done wrong?  How are schedulers meant to be associated with a
> particular change source only?
>
> Thanks
>
>    Duncs
>
> =======================
> packages = [
>    {
>      'name': "package_1",
>      'url': "http://svn/repo1",
>      'title': "PKG1",
>      'category':"pkg1",
>      'status_port':8011,
>    },
>    {
>      'name': "package_2",
>      'url': "http://svn/repo2",
>      'title': "PKG2",
>      'category':"pkg2",
>      'status_port':8012,
>    },
> ]
>
> for package in packages:
>    c['change_source'].append(
>      SVNPoller(
>        svnurl = package['url'],
>        svnuser = svn_user,
>        svnpasswd = svn_pass,
>      )
>    )
>
> for package in common_packages:
>    build = factory.BuildFactory()
>    build.addStep(
>        ShellCommand,
>        description="Creating package",
>        descriptionDone="Package created",
>        command=["make","package"],
>        workdir='.',
>        haltOnFailure="True",
>      )
>      c['schedulers'].append(
>        Scheduler(
>          name="sched_"+package['title']
>          branch=None,
>          treeStableTimer=60,
>          builderNames=[package['title'],],
>        )
>      )

Hi Duncan.
I'm new here too but I think I can take a stab at this, since I've just 
travelled the same road. First off, note that Buildbot assumes everything it 
is doing applies to one source repository. The problem with the code above is 
that the two schedulers cannot discern between changes in repo1 vs repo2. So 
a change in either repository causes both schedulers to fire.

I too have lots of Subversion repositories to deal with (over 100!). 
Fortunately there's a patch [1] that enables use of multiple Subversion 
repositories. With that applied, you can create schedulers which listen to 
distinct repositories. I've just got this working satisfactorily.

Good luck,
Steve.

[1] 
http://sourceforge.net/tracker/index.php?func=detail&aid=1685062&group_id=73177&atid=537003

-- 
Change your thoughts and you change your world.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part.
URL: <http://buildbot.net/pipermail/devel/attachments/20080701/ace09636/attachment.bin>


More information about the devel mailing list