Skip to content

Commit 24242c7

Browse files
authored
gh-419: Allow unstable builders to trigger on PRs (#420)
This intention of this PR is to make it possible to *manually trigger* also unstable buildbots on PRs using the `!buildbot` command (and labels). The lists of "PR builders" are used in several places where I kept it to *only* stable PRs, because those other places didn't seem related to the manual triggering of buildbots on PRs.
1 parent 30d01cc commit 24242c7

File tree

1 file changed

+10
-8
lines changed

1 file changed

+10
-8
lines changed

master/master.cfg

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -299,12 +299,10 @@ for branch_num, (git_url, branchname, git_branch) in enumerate(git_branches):
299299

300300
# Set up Pull Request builders
301301

302-
pull_request_builders = []
302+
stable_pull_request_builders = []
303+
unstable_pull_request_builders = []
303304

304305
for name, worker_name, buildfactory, stability, tier in BUILDERS:
305-
if stability != STABLE:
306-
continue
307-
308306
if "Windows XP" in name or "VS9.0" in name:
309307
continue
310308
# bpo-39911: Python 3.9 dropped Windows 7 support
@@ -313,10 +311,14 @@ for name, worker_name, buildfactory, stability, tier in BUILDERS:
313311

314312
buildername = name + " " + "PR"
315313

314+
if stability != STABLE:
315+
unstable_pull_request_builders.append(buildername)
316+
continue
317+
316318
if any(pattern in buildername for pattern in NO_NOTIFICATION):
317319
continue
318320

319-
pull_request_builders.append(buildername)
321+
stable_pull_request_builders.append(buildername)
320322

321323
source = GitHub(repourl=git_url, **GIT_KWDS)
322324

@@ -350,7 +352,7 @@ c["schedulers"].append(
350352
name="pull-request-scheduler",
351353
change_filter=util.ChangeFilter(filter_fn=should_pr_be_tested),
352354
treeStableTimer=30, # seconds
353-
builderNames=pull_request_builders,
355+
builderNames=stable_pull_request_builders,
354356
)
355357
)
356358

@@ -394,7 +396,7 @@ c["www"] = dict(
394396
"github": {
395397
"class": partial(
396398
CustomGitHubEventHandler,
397-
builder_names=pull_request_builders
399+
builder_names=stable_pull_request_builders + unstable_pull_request_builders,
398400
),
399401
"secret": str(settings.github_change_hook_secret),
400402
"strict": True,
@@ -458,7 +460,7 @@ c["services"].append(
458460
reporters.GitHubStatusPush(
459461
str(settings.github_status_token),
460462
generators=[
461-
BuildStartEndStatusGenerator(builders=github_status_builders + pull_request_builders),
463+
BuildStartEndStatusGenerator(builders=github_status_builders + stable_pull_request_builders),
462464
],
463465
verbose=bool(settings.verbosity),
464466
)

0 commit comments

Comments
 (0)