From 5dd40973f75506b2f2b51d18c81b239654b44294 Mon Sep 17 00:00:00 2001 From: Zachary Ware Date: Fri, 14 Nov 2025 19:13:40 -0600 Subject: [PATCH 1/2] Use max_builds instead of a lock --- master/custom/workers.py | 10 +++++++--- master/master.cfg | 9 --------- 2 files changed, 7 insertions(+), 12 deletions(-) diff --git a/master/custom/workers.py b/master/custom/workers.py index bf960055..3199ddd3 100644 --- a/master/custom/workers.py +++ b/master/custom/workers.py @@ -55,9 +55,13 @@ def __init__( if settings.use_local_worker: self.bb_worker = _worker.LocalWorker(name) else: - self.bb_worker = _worker.Worker(name, str(pw), - notify_on_missing=emails, - keepalive_interval=KEEPALIVE) + self.bb_worker = _worker.Worker( + name, + str(pw), + notify_on_missing=emails, + keepalive_interval=KEEPALIVE, + max_builds=parallel_builders or 1, + ) # Some of Itamar's workers are reprovisioned every Wednesday at 9am PT. # Builds scheduled between 8am - 10am PT on Wednesdays will be delayed to diff --git a/master/master.cfg b/master/master.cfg index 5acf952f..8b9de3d6 100644 --- a/master/master.cfg +++ b/master/master.cfg @@ -149,14 +149,6 @@ GIT_KWDS = { c["builders"] = [] c["schedulers"] = [] -# The following with the worker owners' agreement -cpulock = locks.WorkerLock( - "cpu", - maxCountForWorker={ - w.name: w.parallel_builders for w in WORKERS if w.parallel_builders - }, -) - def is_important_file(filename): unimportant_prefixes = ( @@ -274,7 +266,6 @@ for branch in BRANCHES: builddir=f"{branch.builddir_name}.{worker.name}{f.buildersuffix}", factory=f, tags=tags, - locks=[cpulock.access("counting")], ) if worker.downtime: From 83a36880be1e8cf7bb47a8c0c82437a879e8e4d5 Mon Sep 17 00:00:00 2001 From: Petr Viktorin Date: Thu, 4 Jun 2026 14:42:46 +0200 Subject: [PATCH 2/2] Simplify --- master/custom/workers.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/master/custom/workers.py b/master/custom/workers.py index 3199ddd3..cdc4d151 100644 --- a/master/custom/workers.py +++ b/master/custom/workers.py @@ -30,7 +30,7 @@ def __init__( tags=None, branches=None, not_branches=None, - parallel_builders=None, + parallel_builders=1, parallel_tests=None, timeout_factor=1, exclude_test_resources=None, @@ -40,7 +40,6 @@ def __init__( self.tags = tags or set() self.branches = branches self.not_branches = not_branches - self.parallel_builders = parallel_builders self.parallel_tests = parallel_tests self.timeout_factor = timeout_factor self.exclude_test_resources = exclude_test_resources or [] @@ -60,7 +59,7 @@ def __init__( str(pw), notify_on_missing=emails, keepalive_interval=KEEPALIVE, - max_builds=parallel_builders or 1, + max_builds=parallel_builders, ) # Some of Itamar's workers are reprovisioned every Wednesday at 9am PT.