summaryrefslogtreecommitdiff
path: root/tests/unit/test_model_upgrade.py
diff options
context:
space:
mode:
authorJames E. Blair <jim@acmegating.com>2022-03-03 15:59:18 -0800
committerJames E. Blair <jim@acmegating.com>2022-03-03 16:27:25 -0800
commitf27ce79a461e0ece146b7554f2156a90afc6624a (patch)
treea35bf538d190d91a60b97f85169c160f3692617b /tests/unit/test_model_upgrade.py
parent5a60bc0ab620cdd97c1db20e7db5baa3df855697 (diff)
downloadzuul-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.py2
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)