Skip to content

Commit 23645f9

Browse files
zwareencukou
authored andcommitted
Migrate extra_factory_args to worker configuration
1 parent 5bcb458 commit 23645f9

2 files changed

Lines changed: 26 additions & 26 deletions

File tree

master/custom/workers.py

Lines changed: 22 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -30,15 +30,15 @@ def __init__(
3030
not_branches=None,
3131
parallel_builders=None,
3232
parallel_tests=None,
33-
exclude_test_resources=None,
33+
extra_factory_args=None,
3434
):
3535
self.name = name
3636
self.tags = tags or set()
3737
self.branches = branches
3838
self.not_branches = not_branches
3939
self.parallel_builders = parallel_builders
4040
self.parallel_tests = parallel_tests
41-
self.exclude_test_resources = exclude_test_resources
41+
self.extra_factory_args = extra_factory_args or {}
4242
worker_settings = settings.workers[name]
4343
owner = name.split("-")[0]
4444
owner_settings = settings.owners[owner]
@@ -124,6 +124,10 @@ def get_workers(settings):
124124
tags=['linux', 'unix', 'rhel', 'ppc64le'],
125125
parallel_tests=10,
126126
branches=['3.10', '3.11', '3.12'],
127+
extra_factory_args={
128+
# Increase the timeout on this slow worker
129+
"timeout_factor": 2,
130+
},
127131
),
128132
cpw(
129133
name="cstratak-CentOS9-ppc64le",
@@ -199,7 +203,9 @@ def get_workers(settings):
199203
# Tests fail with latin1 encoding on 3.12, probably earlier
200204
not_branches=['3.12', '3.11', '3.10'],
201205
# Problematic ISP causes issues connecting to testpython.net
202-
exclude_test_resources=['urlfetch', 'network'],
206+
extra_factory_args=dict(
207+
exclude_test_resources=['urlfetch', 'network'],
208+
),
203209
),
204210
cpw(
205211
name="savannah-raspbian",
@@ -216,21 +222,27 @@ def get_workers(settings):
216222
name="pablogsal-arch-x86_64",
217223
tags=['linux', 'unix', 'arch', 'amd64', 'x86-64'],
218224
# Problematic ISP causes issues connecting to testpython.net
219-
exclude_test_resources=['urlfetch', 'network'],
225+
extra_factory_args=dict(
226+
exclude_test_resources=['urlfetch', 'network'],
227+
),
220228
),
221229
cpw(
222230
name="pablogsal-macos-m1",
223231
tags=['macOS', 'unix', 'arm', 'arm64'],
224232
parallel_tests=4,
225233
# Problematic ISP causes issues connecting to testpython.net
226-
exclude_test_resources=['urlfetch', 'network'],
234+
extra_factory_args=dict(
235+
exclude_test_resources=['urlfetch', 'network'],
236+
),
227237
),
228238
cpw(
229239
name="pablogsal-rasp",
230240
tags=['linux', 'unix', 'raspbian', 'debian', 'arm'],
231241
parallel_tests=1, # Reduced from 2: ASAN builds use 2-10x more memory
232242
# Problematic ISP causes issues connecting to testpython.net
233-
exclude_test_resources=['urlfetch', 'network'],
243+
extra_factory_args=dict(
244+
exclude_test_resources=['urlfetch', 'network'],
245+
),
234246
),
235247
cpw(
236248
name="skumaran-ubuntu-x86_64",
@@ -283,6 +295,10 @@ def get_workers(settings):
283295
not_branches=['3.10'],
284296
parallel_tests=2,
285297
parallel_builders=2,
298+
extra_factory_args={
299+
# Increase the timeout on this slow worker
300+
"timeout_factor": 2,
301+
},
286302
),
287303
cpw(
288304
name="ambv-bb-win11",

master/master.cfg

Lines changed: 4 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -154,24 +154,6 @@ c["builders"] = []
154154
c["schedulers"] = []
155155

156156
parallel = {w.name: f"-j{w.parallel_tests}" for w in WORKERS if w.parallel_tests}
157-
extra_factory_args = {
158-
"cstratak-RHEL8-ppc64le": {
159-
# Increase the timeout on this slow worker
160-
"timeout_factor": 2,
161-
},
162-
"bcannon-wasi": {
163-
# Increase the timeout on this slow worker
164-
"timeout_factor": 2,
165-
},
166-
167-
}
168-
169-
# Build factory args from worker properties
170-
for w in WORKERS:
171-
if w.exclude_test_resources:
172-
if w.name not in extra_factory_args:
173-
extra_factory_args[w.name] = {}
174-
extra_factory_args[w.name]["exclude_test_resources"] = w.exclude_test_resources
175157

176158
# The following with the worker owners' agreement
177159
cpulock = locks.WorkerLock(
@@ -288,7 +270,7 @@ for branch_num, (git_url, branchname, git_branch) in enumerate(git_branches):
288270
source,
289271
parallel=parallel.get(worker_name),
290272
branch=branchname,
291-
**extra_factory_args.get(worker_name, {}),
273+
**worker.extra_factory_args,
292274
)
293275
tags = [branchname, stability, *getattr(f, "tags", [])]
294276
if tier:
@@ -389,14 +371,16 @@ for name, worker_name, buildfactory, stability, tier in BUILDERS:
389371

390372
source = GitHub(repourl=git_url, **GIT_KWDS)
391373

374+
worker = WORKERS_BY_NAME[worker_name]
375+
392376
f = buildfactory(
393377
source,
394378
parallel=parallel.get(worker_name),
395379
# Use the same downstream branch names as the "custom"
396380
# builder (check what the factories are doing with this
397381
# parameter for more info).
398382
branch="3",
399-
**extra_factory_args.get(worker_name, {}),
383+
**worker.extra_factory_args,
400384
)
401385

402386
tags = ["PullRequest", stability, *getattr(f, "tags", [])]

0 commit comments

Comments
 (0)