diff options
author | James E. Blair <jim@acmegating.com> | 2022-03-03 15:59:18 -0800 |
---|---|---|
committer | James E. Blair <jim@acmegating.com> | 2022-03-03 16:27:25 -0800 |
commit | f27ce79a461e0ece146b7554f2156a90afc6624a (patch) | |
tree | a35bf538d190d91a60b97f85169c160f3692617b /tests/unit/test_model_upgrade.py | |
parent | 5a60bc0ab620cdd97c1db20e7db5baa3df855697 (diff) | |
download | zuul-f27ce79a461e0ece146b7554f2156a90afc6624a.tar.gz |
Trigger pipeline runs when semaphores release
The recent optimization to avoid processing pipelines if no events are
waiting did not account for semaphores which may be held by jobs in
different pipelines. In that case, a job completing in one pipeline
needs to generate an event in another pipeline in order to prompt it
to begin processing.
We have no easy way of knowing which pipelines may have jobs which are
waiting for a semaphore, so this change broadcasts an event to every
pipeline in the tenant when a semaphore is released. Hopefully this
shouldn't generate that much more traffic (how much depends on how
frequently semaphores are released). If desired, we can further
optimize this by storing semaphore pipeline waiters in ZK in a later
change.
Change-Id: Ide381279b0442d11535c00746e4baf19f32f3cd7
Diffstat (limited to 'tests/unit/test_model_upgrade.py')
-rw-r--r-- | tests/unit/test_model_upgrade.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/unit/test_model_upgrade.py b/tests/unit/test_model_upgrade.py index 9bbaf12f7..94c2d307e 100644 --- a/tests/unit/test_model_upgrade.py +++ b/tests/unit/test_model_upgrade.py @@ -173,7 +173,7 @@ class TestSemaphoreModelUpgrade(ZuulTestCase): 1) # Try to release the old-style semaphore after the model API upgrade. - tenant.semaphore_handler.release(item, job) + tenant.semaphore_handler.release(self.scheds.first.sched, item, job) self.assertEqual( len(tenant.semaphore_handler.semaphoreHolders("test-semaphore")), 0) |