From 23645f97e86bdc406effc41bea637f995741cdd8 Mon Sep 17 00:00:00 2001 From: Zachary Ware Date: Sat, 8 Nov 2025 16:12:54 -0600 Subject: [PATCH 1/2] Migrate extra_factory_args to worker configuration --- master/custom/workers.py | 28 ++++++++++++++++++++++------ master/master.cfg | 24 ++++-------------------- 2 files changed, 26 insertions(+), 26 deletions(-) diff --git a/master/custom/workers.py b/master/custom/workers.py index 06e4752a..f9925325 100644 --- a/master/custom/workers.py +++ b/master/custom/workers.py @@ -30,7 +30,7 @@ def __init__( not_branches=None, parallel_builders=None, parallel_tests=None, - exclude_test_resources=None, + extra_factory_args=None, ): self.name = name self.tags = tags or set() @@ -38,7 +38,7 @@ def __init__( self.not_branches = not_branches self.parallel_builders = parallel_builders self.parallel_tests = parallel_tests - self.exclude_test_resources = exclude_test_resources + self.extra_factory_args = extra_factory_args or {} worker_settings = settings.workers[name] owner = name.split("-")[0] owner_settings = settings.owners[owner] @@ -124,6 +124,10 @@ def get_workers(settings): tags=['linux', 'unix', 'rhel', 'ppc64le'], parallel_tests=10, branches=['3.10', '3.11', '3.12'], + extra_factory_args={ + # Increase the timeout on this slow worker + "timeout_factor": 2, + }, ), cpw( name="cstratak-CentOS9-ppc64le", @@ -199,7 +203,9 @@ def get_workers(settings): # Tests fail with latin1 encoding on 3.12, probably earlier not_branches=['3.12', '3.11', '3.10'], # Problematic ISP causes issues connecting to testpython.net - exclude_test_resources=['urlfetch', 'network'], + extra_factory_args=dict( + exclude_test_resources=['urlfetch', 'network'], + ), ), cpw( name="savannah-raspbian", @@ -216,21 +222,27 @@ def get_workers(settings): name="pablogsal-arch-x86_64", tags=['linux', 'unix', 'arch', 'amd64', 'x86-64'], # Problematic ISP causes issues connecting to testpython.net - exclude_test_resources=['urlfetch', 'network'], + extra_factory_args=dict( + exclude_test_resources=['urlfetch', 'network'], + ), ), cpw( name="pablogsal-macos-m1", tags=['macOS', 'unix', 'arm', 'arm64'], parallel_tests=4, # Problematic ISP causes issues connecting to testpython.net - exclude_test_resources=['urlfetch', 'network'], + extra_factory_args=dict( + exclude_test_resources=['urlfetch', 'network'], + ), ), cpw( name="pablogsal-rasp", tags=['linux', 'unix', 'raspbian', 'debian', 'arm'], parallel_tests=1, # Reduced from 2: ASAN builds use 2-10x more memory # Problematic ISP causes issues connecting to testpython.net - exclude_test_resources=['urlfetch', 'network'], + extra_factory_args=dict( + exclude_test_resources=['urlfetch', 'network'], + ), ), cpw( name="skumaran-ubuntu-x86_64", @@ -283,6 +295,10 @@ def get_workers(settings): not_branches=['3.10'], parallel_tests=2, parallel_builders=2, + extra_factory_args={ + # Increase the timeout on this slow worker + "timeout_factor": 2, + }, ), cpw( name="ambv-bb-win11", diff --git a/master/master.cfg b/master/master.cfg index edc821d7..1696838c 100644 --- a/master/master.cfg +++ b/master/master.cfg @@ -154,24 +154,6 @@ c["builders"] = [] c["schedulers"] = [] parallel = {w.name: f"-j{w.parallel_tests}" for w in WORKERS if w.parallel_tests} -extra_factory_args = { - "cstratak-RHEL8-ppc64le": { - # Increase the timeout on this slow worker - "timeout_factor": 2, - }, - "bcannon-wasi": { - # Increase the timeout on this slow worker - "timeout_factor": 2, - }, - -} - -# Build factory args from worker properties -for w in WORKERS: - if w.exclude_test_resources: - if w.name not in extra_factory_args: - extra_factory_args[w.name] = {} - extra_factory_args[w.name]["exclude_test_resources"] = w.exclude_test_resources # The following with the worker owners' agreement cpulock = locks.WorkerLock( @@ -288,7 +270,7 @@ for branch_num, (git_url, branchname, git_branch) in enumerate(git_branches): source, parallel=parallel.get(worker_name), branch=branchname, - **extra_factory_args.get(worker_name, {}), + **worker.extra_factory_args, ) tags = [branchname, stability, *getattr(f, "tags", [])] if tier: @@ -389,6 +371,8 @@ for name, worker_name, buildfactory, stability, tier in BUILDERS: source = GitHub(repourl=git_url, **GIT_KWDS) + worker = WORKERS_BY_NAME[worker_name] + f = buildfactory( source, parallel=parallel.get(worker_name), @@ -396,7 +380,7 @@ for name, worker_name, buildfactory, stability, tier in BUILDERS: # builder (check what the factories are doing with this # parameter for more info). branch="3", - **extra_factory_args.get(worker_name, {}), + **worker.extra_factory_args, ) tags = ["PullRequest", stability, *getattr(f, "tags", [])] From 3b99a44d642bb1fab7f7ce472ae982a667c39e28 Mon Sep 17 00:00:00 2001 From: Petr Viktorin Date: Fri, 27 Mar 2026 17:29:19 +0100 Subject: [PATCH 2/2] Put extra_factory_args in a flat namespace for definition --- master/custom/workers.py | 39 +++++++++++++++++---------------------- 1 file changed, 17 insertions(+), 22 deletions(-) diff --git a/master/custom/workers.py b/master/custom/workers.py index f9925325..47987931 100644 --- a/master/custom/workers.py +++ b/master/custom/workers.py @@ -30,7 +30,8 @@ def __init__( not_branches=None, parallel_builders=None, parallel_tests=None, - extra_factory_args=None, + timeout_factor=None, + exclude_test_resources=None, ): self.name = name self.tags = tags or set() @@ -38,7 +39,15 @@ def __init__( self.not_branches = not_branches self.parallel_builders = parallel_builders self.parallel_tests = parallel_tests - self.extra_factory_args = extra_factory_args or {} + + # Forward some args to build factories + _xf_args = {} + self.extra_factory_args = _xf_args + if timeout_factor is not None: + _xf_args['timeout_factor'] = timeout_factor + if exclude_test_resources is not None: + _xf_args['exclude_test_resources'] = exclude_test_resources + worker_settings = settings.workers[name] owner = name.split("-")[0] owner_settings = settings.owners[owner] @@ -124,10 +133,7 @@ def get_workers(settings): tags=['linux', 'unix', 'rhel', 'ppc64le'], parallel_tests=10, branches=['3.10', '3.11', '3.12'], - extra_factory_args={ - # Increase the timeout on this slow worker - "timeout_factor": 2, - }, + timeout_factor=2, # Increase the timeout on this slow worker ), cpw( name="cstratak-CentOS9-ppc64le", @@ -203,9 +209,7 @@ def get_workers(settings): # Tests fail with latin1 encoding on 3.12, probably earlier not_branches=['3.12', '3.11', '3.10'], # Problematic ISP causes issues connecting to testpython.net - extra_factory_args=dict( - exclude_test_resources=['urlfetch', 'network'], - ), + exclude_test_resources=['urlfetch', 'network'], ), cpw( name="savannah-raspbian", @@ -222,27 +226,21 @@ def get_workers(settings): name="pablogsal-arch-x86_64", tags=['linux', 'unix', 'arch', 'amd64', 'x86-64'], # Problematic ISP causes issues connecting to testpython.net - extra_factory_args=dict( - exclude_test_resources=['urlfetch', 'network'], - ), + exclude_test_resources=['urlfetch', 'network'], ), cpw( name="pablogsal-macos-m1", tags=['macOS', 'unix', 'arm', 'arm64'], parallel_tests=4, # Problematic ISP causes issues connecting to testpython.net - extra_factory_args=dict( - exclude_test_resources=['urlfetch', 'network'], - ), + exclude_test_resources=['urlfetch', 'network'], ), cpw( name="pablogsal-rasp", tags=['linux', 'unix', 'raspbian', 'debian', 'arm'], parallel_tests=1, # Reduced from 2: ASAN builds use 2-10x more memory # Problematic ISP causes issues connecting to testpython.net - extra_factory_args=dict( - exclude_test_resources=['urlfetch', 'network'], - ), + exclude_test_resources=['urlfetch', 'network'], ), cpw( name="skumaran-ubuntu-x86_64", @@ -295,10 +293,7 @@ def get_workers(settings): not_branches=['3.10'], parallel_tests=2, parallel_builders=2, - extra_factory_args={ - # Increase the timeout on this slow worker - "timeout_factor": 2, - }, + timeout_factor=2, # Increase the timeout on this slow worker ), cpw( name="ambv-bb-win11",