diff --git a/master/custom/workers.py b/master/custom/workers.py index 06e4752a..47987931 100644 --- a/master/custom/workers.py +++ b/master/custom/workers.py @@ -30,6 +30,7 @@ def __init__( not_branches=None, parallel_builders=None, parallel_tests=None, + timeout_factor=None, exclude_test_resources=None, ): self.name = name @@ -38,7 +39,15 @@ def __init__( self.not_branches = not_branches self.parallel_builders = parallel_builders self.parallel_tests = parallel_tests - self.exclude_test_resources = exclude_test_resources + + # 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,6 +133,7 @@ def get_workers(settings): tags=['linux', 'unix', 'rhel', 'ppc64le'], parallel_tests=10, branches=['3.10', '3.11', '3.12'], + timeout_factor=2, # Increase the timeout on this slow worker ), cpw( name="cstratak-CentOS9-ppc64le", @@ -283,6 +293,7 @@ def get_workers(settings): not_branches=['3.10'], parallel_tests=2, parallel_builders=2, + timeout_factor=2, # Increase the timeout on this slow worker ), 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", [])]