153f8a90cc
This allows jobs to request multiple semaphores. Zuul will wait until all are available before acquiring them* and will not start a job unless all have been acquired. This is useful for jobs which require access to mulitple limited resources (especially if other jobs require access to a subset or superset of those same resources). * Implementation note: for efficiency, we actually do acquire them one-by-one but then release any which have been acquired if they are not all available. This all happens very quickly within a single attempt to start a job. We don't hold semaphores while we wait for others as that could cause deadlocks. To be consistent with other job attributes which accept lists, this deprecates job.semaphore and replaces it with job.semaphores. Change-Id: I295a891a2d02b904820d8f60afe8ef862693b75d
24 lines
999 B
YAML
24 lines
999 B
YAML
---
|
|
features:
|
|
- |
|
|
Jobs may now request multiple semaphores and they will not start until
|
|
all semaphores are acquired.
|
|
|
|
Use the new :attr:`job.semaphores` (plural) attribute to specify them.
|
|
|
|
Note that the new attribute is additive when considering
|
|
inheritance and job variants. That is to say that a job
|
|
definition with a `semaphores` attribute will extend the list of
|
|
semaphores supplied by its parent rather than overriding it (which
|
|
is the behavior for the deprecated attribute).
|
|
deprecations:
|
|
- |
|
|
The job attribute :attr:`job.semaphore` (note the singular rather
|
|
than plural form) job attribute is now deprecated. Use the plural
|
|
form :attr:`job.semaphores` instead. As with most list items in
|
|
Zuul configuration, it also accepts a single item without the
|
|
wrapping list, so to convert existing jobs, simply change the
|
|
spelling of the attribute, no change to the value is required.
|
|
|
|
The singular form will be removed in Zuul 5.0.
|