Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion master/custom/workers.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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]
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -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",
Expand Down
24 changes: 4 additions & 20 deletions master/master.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -389,14 +371,16 @@ 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),
# Use the same downstream branch names as the "custom"
# 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", [])]
Expand Down