[Buildbot-commits] [Buildbot] #2532: Support using interlocks for sequences of steps

Buildbot trac trac at buildbot.net
Thu Jul 18 20:07:15 UTC 2013


#2532: Support using interlocks for sequences of steps
--------------------------+-----------------------
Reporter:  shirokuroneko  |      Owner:
    Type:  enhancement    |     Status:  new
Priority:  minor          |  Milestone:  undecided
 Version:  0.8.7p1        |   Keywords:
--------------------------+-----------------------
 Using interlocks for mutual exclusion of builders is quite useful, but in
 many cases we don't want to lock the whole build process but rather a
 sequence of steps within the builder. This becomes a problem when some
 steps are potentially expensive, yet they don't really require being
 exclusive.

 Here's a real world example of this case. Let's say we have a set of
 builders building and testing different branches/configurations for a
 embedded device. A simplification of the builder steps could look
 something like this:

 1. Sync branch for the builder.
 2. Build the code.
 3. Upload/flash to the device.
 4. Run tests on the device.

 In this case steps 1 and 2 and run in parallel in all builders, but steps
 3 and 4 are limited to the actual availability of devices. If we have less
 devices than builders, then we need interlocks to arbitrate access.
 However, with the current interlock approach we would need to lock the
 whole builders, therefore forcing steps 1 and 2 to be sequential with no
 real reason.

 My suggestion is to introduce the ability to lock not only full builders,
 but also sequences of steps. In this case the device availability lock
 could be limited to the sequence of steps 3 to 4. If for any reason the
 execution of the sequence were halted (e.g. flashing fails and it aborts
 the build) the lock would be automatically released. Similarly, the lock
 would also take action even if some steps in the sequence are skipped,
 including the first and the last.

-- 
Ticket URL: <http://trac.buildbot.net/ticket/2532>
Buildbot <http://buildbot.net/>
Buildbot: build/test automation


More information about the Commits mailing list