-
Bug
-
Resolution: Unresolved
-
Major
-
None
We have the use case of executing multiple build jobs in sequential and/or parallel order and want to block downstream jobs. We activated option "Block build when upstream project is building" for all downstream build jobs (mostly freestyle-projects), but sometimes downstream jobs are already executed while some (transitive) upstream project is still in progress of being queued (a downstream job could be triggered by more than one parallel executed upstream job that do not finish at the same time). So there might be some kind of race condition in the queue implementation.
- is duplicated by
-
JENKINS-5737 block-when-upstream-building does not handle dependant builds
-
- Closed
-
- is related to
-
JENKINS-5125 Projects building at the same time despite "Block build when upstream is building" option
-
- Open
-
To fix this properly without a giant lock, we need to be able to take a snapshot of the queue/executor status and base computation on that snapshot.
Then there's additional problem is that there's a small time window after a build is considered finished and before the build triggers kick in to schedule downstream jobs (this is needed so that downstream builds always see its upstream as completed.)