[Buildbot-devel] AnyBranchScheduler in update mode
warner-buildbot at lothar.com
Sun Nov 26 08:34:21 UTC 2006
"Carl Dionne" <cdionne at quazal.com> writes:
> I would like to configure BuildBot to automatically perform a quick
> build, in update mode, for all commits done in any branches. The
> AnyBranchScheduler almost does the job, except that since it works by
> creating new schedulers sharing the same builder, performing a cvs
> update may involve changing many files by moving from one branch to
> another one, and will slow down compile.
> Is there a way to achieve this?
The best long-term answer is probably to enhance the slave-side CVS
checkout/update step to be able to cache some number of branches. This
probably involves changing the current use of a 'source' directory to
something like 'source-%s' % branchname. My hunch is that the code changes
are actually pretty minimal, if we don't try to get fancy and delete
infrequently-used branches. Probably in buildbot/slave/commands.py:1115, in
SourceBase.start, something to set self.srcdir specially depending upon the
branch name. (in fact, breaking it out to a function that can be overridden
by each VC subclass would be ideal, since each VC subclass has a different
concept of branchnames anyways).
To bound the space consumed would be a little more effort, but maybe it would
be easier to have an external cron job look for these source-* directories
and periodically delete ones that haven't been modified for, say, a month or
> I also tried changing the AnyBranchScheduler to create new builders as
> it creates new schedulers, where these builders would be using a
> separate build, but I don't know how to let BuildBot know that it
> should activate or use these new builders, after they have been added
> to the configuration.
Yeah, creating new Builders from within the Scheduler is pretty hard (any
time you create a new Builder, you pretty much have to reload the whole
config file). It would be easier to have a loop in your master.cfg that
creates all those Builders ahead of time.
More information about the devel