[Buildbot-devel] scheduler.Dependent HOWTO
warner-buildbot at lothar.com
Tue Jan 24 02:13:35 UTC 2006
> From a look into the scheduler.py module it appears as if the Dependent
> scheduler could do the job, i.e. be used to watch for all the upstream
> builders to finish, and then run whatever is needed to compile the report.
> Am I guessing right ? How do I use that class ? In particular, how do I
> construct it ? (What does the 'upstream' parameter refer to ?)
As you've probably already seen by now, upstream= is used to organize the
Schedulers into a tree, where each Dependent scheduler watches a single
"upstream" scheduler. For any given Change, the downstream Dependent instance
will not start a build until its upstream Scheduler has successfully built
that same Change. Specifically, the upstream= argument is a reference to an
existing Scheduler instance. The User's Manual has an example of its usage.
The upstream= argument needs to be changed to accept a *list* of Scheduler
instances, since build dependencies are a lot more useful that way. In
particular, we used to have a .deb-constructing builder on the Twisted
buildbot, which would not run until the unit tests had passed for all
supported versions of Python. This was implemented by having the 'make-debs'
builder be dependent upon three upstream builders: 'full-2.2', 'full-2.3',
and 'full-2.4' . When the old Interlocks were removed in favor of distinct
Locks and schedule.Dependent classes, this multiple-upstream functionality
was lost, and I haven't gotten around to re-creating it yet.
When that happens, of course a single instance will be transformed into a
one-entry list, for compatibility with existing config files.
More information about the devel