forked from python/buildmaster-config
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathworkers.py
More file actions
372 lines (361 loc) · 12.4 KB
/
workers.py
File metadata and controls
372 lines (361 loc) · 12.4 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
# -*- python -*- vi:ft=python:
# kate: indent-mode python; hl python;
# vim:set ts=8 sw=4 sts=4 et:
from functools import partial
from buildbot.plugins import worker as _worker
from custom.factories import MAIN_BRANCH_NAME
# By default, the buildmaster sends a simple, non-blocking message to each
# worker every hour. These keepalives ensure that traffic is flowing over the
# underlying TCP connection, allowing the system’s network stack to detect any
# problems before a build is started.
#
# The default is 3600 seconds. Use a shorter interval to avoid
# "lost remote step" on the worker side.
# https://bugs.python.org/issue41642
KEEPALIVE = 60
class CPythonWorker:
def __init__(
self,
settings,
name,
tags=None,
branches=None,
not_branches=None,
parallel_builders=None,
parallel_tests=None,
timeout_factor=None,
exclude_test_resources=None,
):
self.name = name
self.tags = tags or set()
self.branches = branches
self.not_branches = not_branches
self.parallel_builders = parallel_builders
self.parallel_tests = parallel_tests
# 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]
pw = worker_settings.get("password", None) or owner_settings.password
owner_email = owner_settings.get("email", None)
emails = [str(owner_email)] if owner_email else []
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)
def get_workers(settings):
cpw = partial(CPythonWorker, settings)
if settings.use_local_worker:
return [cpw(name="local-worker")]
return [
cpw(
name="angelico-debian-amd64",
tags=['linux', 'unix', 'debian', 'amd64', 'x86-64'],
),
cpw(
name="billenstein-macos",
tags=['macOS', 'unix', 'amd64', 'x86-64'],
),
cpw(
name="bolen-ubuntu",
tags=['linux', 'unix', 'ubuntu', 'amd64', 'x86-64'],
),
cpw(
name="bolen-windows10",
tags=['windows', 'win10', 'amd64', 'x86-64'],
),
cpw(
name="cstratak-fedora-rawhide-x86_64",
tags=['linux', 'unix', 'fedora', 'amd64', 'x86-64'],
parallel_tests=10,
),
cpw(
name="cstratak-fedora-stable-x86_64",
tags=['linux', 'unix', 'fedora', 'amd64', 'x86-64'],
parallel_tests=10,
),
cpw(
name="cstratak-RHEL8-x86_64",
tags=['linux', 'unix', 'rhel', 'amd64', 'x86-64'],
parallel_tests=10,
branches=['3.10', '3.11', '3.12'],
),
cpw(
name="cstratak-RHEL8-fips-x86_64",
tags=['linux', 'unix', 'rhel', 'amd64', 'x86-64', 'fips'],
parallel_tests=6,
# Only 3.12 for RHEL8 FIPS builder
branches=['3.12'],
),
cpw(
name="cstratak-CentOS9-x86_64",
tags=['linux', 'unix', 'rhel', 'amd64', 'x86-64'],
parallel_tests=6,
),
cpw(
name="cstratak-CentOS9-fips-x86_64",
tags=['linux', 'unix', 'rhel', 'amd64', 'x86-64', 'fips'],
parallel_tests=6,
# Only 3.12+ for FIPS builder
not_branches=["3.10", "3.11"],
),
cpw(
name="cstratak-fedora-rawhide-ppc64le",
tags=['linux', 'unix', 'fedora', 'ppc64le'],
parallel_tests=10,
),
cpw(
name="cstratak-fedora-stable-ppc64le",
tags=['linux', 'unix', 'fedora', 'ppc64le'],
parallel_tests=10,
),
cpw(
name="cstratak-RHEL8-ppc64le",
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",
tags=['linux', 'unix', 'rhel', 'ppc64le'],
parallel_tests=10,
),
cpw(
name="cstratak-fedora-rawhide-aarch64",
tags=['linux', 'unix', 'fedora', 'arm', 'arm64', 'aarch64'],
parallel_tests=40,
),
cpw(
name="cstratak-fedora-stable-aarch64",
tags=['linux', 'unix', 'fedora', 'arm', 'arm64', 'aarch64'],
parallel_tests=40,
),
cpw(
name="cstratak-RHEL8-aarch64",
tags=['linux', 'unix', 'rhel', 'arm', 'arm64', 'aarch64'],
parallel_tests=40,
branches=['3.10', '3.11', '3.12'],
),
cpw(
name="cstratak-CentOS9-aarch64",
tags=['linux', 'unix', 'rhel', 'arm', 'arm64', 'aarch64'],
parallel_tests=40,
),
cpw(
name="diegorusso-aarch64-bigmem",
tags=['linux', 'unix', 'ubuntu', 'arm', 'arm64', 'aarch64', 'bigmem'],
not_branches=['3.10', '3.11', '3.12', '3.13', '3.14'],
parallel_tests=8,
),
cpw(
name="cstratak-fedora-rawhide-s390x",
tags=['linux', 'unix', 'fedora', 's390x'],
parallel_tests=10,
),
cpw(
name="cstratak-fedora-stable-s390x",
tags=['linux', 'unix', 'fedora', 's390x'],
parallel_tests=10,
),
cpw(
name="cstratak-rhel8-s390x",
tags=['linux', 'unix', 'rhel', 's390x'],
parallel_tests=10,
branches=['3.10', '3.11', '3.12'],
),
cpw(
name="cstratak-rhel9-s390x",
tags=['linux', 'unix', 'rhel', 's390x'],
parallel_tests=10,
),
cpw(
name="gps-raspbian",
tags=['linux', 'unix', 'raspbian', 'debian', 'armv6', 'armv7l',
'aarch32', 'arm'],
parallel_tests=4,
),
cpw(
name="stan-aarch64-ubuntu",
tags=['linux', 'unix', 'ubuntu', 'arm', 'arm64', 'aarch64'],
parallel_tests=4,
# test_xpickle doesn't exist on these branches
not_branches=['3.12', '3.11', '3.10'],
),
cpw(
name="stan-raspbian",
tags=['linux', 'unix', 'raspbian', 'debian', 'armv8',
'aarch64', 'arm'],
parallel_tests=4,
# 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'],
),
cpw(
name="savannah-raspbian",
tags=['linux', 'unix', 'raspbian', 'debian', 'armv8',
'aarch64', 'arm'],
parallel_tests=4,
),
cpw(
name="kulikjak-solaris-sparcv9",
tags=['solaris', 'unix', 'sparc', 'sparcv9'],
parallel_tests=16,
),
cpw(
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'],
),
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'],
),
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'],
),
cpw(
name="skumaran-ubuntu-x86_64",
tags=['linux', 'unix', 'ubuntu', 'amd64', 'x86-64'],
),
cpw(
name="ware-alpine",
tags=['linux', 'unix', 'alpine', 'docker', 'amd64', 'x86-64', 'musl'],
not_branches=['3.10', '3.11', '3.12', '3.13'],
parallel_tests=6,
),
cpw(
name="ware-freebsd",
tags=['freebsd', 'bsd', 'unix', 'amd64', 'x86-64'],
parallel_tests=6,
),
cpw(
name="opsec-fbsd14",
tags=['freebsd', 'bsd', 'unix', 'amd64', 'x86-64'],
parallel_tests=4,
),
cpw(
name="opsec-fbsd15",
tags=['freebsd', 'bsd', 'unix', 'amd64', 'x86-64'],
parallel_tests=4,
),
cpw(
name="opsec-fbsd16",
tags=['freebsd', 'bsd', 'unix', 'amd64', 'x86-64'],
parallel_tests=4,
),
cpw(
name="ware-debian-x86",
tags=['linux', 'unix', 'debian', 'x86'],
parallel_tests=6,
),
cpw(
name="ware-win11",
tags=['windows', 'win11', 'amd64', 'x86-64'],
parallel_tests=2,
),
cpw(
name="linaro-win-arm64",
tags=['windows', 'arm64'],
parallel_tests=4,
),
cpw(
name="bcannon-wasi",
tags=['wasm', 'wasi'],
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",
tags=['windows', 'win11', 'amd64', 'x86-64', 'bigmem'],
not_branches=['3.10', '3.11', '3.12', '3.13', '3.14'],
parallel_tests=4,
),
cpw(
name="itamaro-centos-aws",
tags=['linux', 'unix', 'rhel', 'amd64', 'x86-64'],
not_branches=['3.10', '3.11', '3.12'],
parallel_tests=10,
parallel_builders=2,
),
cpw(
name="itamaro-win64-srv-22-aws",
tags=['windows', 'win-srv-22', 'amd64', 'x86-64'],
not_branches=['3.10', '3.11', '3.12'],
parallel_tests=10,
parallel_builders=2,
),
cpw(
name="itamaro-macos-intel-aws",
tags=['macOS', 'unix', 'amd64', 'x86-64'],
not_branches=['3.10', '3.11', '3.12'],
parallel_tests=10,
),
cpw(
name="itamaro-macos-arm64-aws",
tags=['macOS', 'unix', 'arm', 'arm64'],
not_branches=['3.10', '3.11', '3.12'],
parallel_tests=10,
),
cpw(
name="kushaldas-wasi",
tags=['wasm', 'wasi'],
not_branches=['3.10'],
parallel_tests=4,
parallel_builders=2,
),
cpw(
name="onder-riscv64",
tags=['linux', 'unix', 'ubuntu', 'riscv64'],
not_branches=['3.10'],
parallel_tests=4,
),
cpw(
name="rkm-arm64-ios-simulator",
tags=['iOS'],
not_branches=['3.10', '3.11', '3.12'],
parallel_builders=1, # All builds use the same simulator
),
cpw(
name="rkm-emscripten",
tags=['emscripten'],
not_branches=['3.10', '3.11', '3.12', '3.13'],
parallel_builders=4,
),
cpw(
name="mhsmith-android-aarch64",
tags=['android'],
not_branches=['3.10', '3.11', '3.12'],
parallel_builders=1, # All builds use the same emulator and app ID.
),
cpw(
name="mhsmith-android-x86_64",
tags=['android'],
not_branches=['3.10', '3.11', '3.12'],
parallel_builders=1, # All builds use the same emulator and app ID.
),
cpw(
name="malvex-nixos-x86_64",
tags=['linux', 'unix', 'nixos', 'amd64', 'x86-64'],
parallel_tests=10,
),
]