Opened 6 years ago

Last modified 6 years ago

#2532 new enhancement

Support using interlocks for sequences of steps

Reported by: shirokuroneko Owned by:
Priority: minor Milestone: 0.9.+
Version: 0.8.7p1 Keywords: locks
Cc: rutsky.vladimir@…


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.

Change History (2)

comment:1 Changed 6 years ago by rutsky

  • Cc rutsky.vladimir@… added

comment:2 Changed 6 years ago by dustin

  • Keywords locks added
  • Milestone changed from undecided to 0.9.+
Note: See TracTickets for help on using tickets.