From 43086da8105097409b8bd42ea9e6c7107755c7a8 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Petr=20=C5=A0tetiar?= Date: Mon, 15 Mar 2021 22:46:09 +0100 Subject: [PATCH] phase1,phase2: shuffle order of builds MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit It seems that once there are new commits, buildbot restarts building all targets in alphabetical order. The current logic pretty much disables the building of the alphabetically last targets, so until there is proper solution just workaround it by randomly shuffling the builders list. References: https://github.com/buildbot/buildbot/issues/5193 Signed-off-by: Petr Å tetiar --- phase1/master.cfg | 7 +++++++ phase2/master.cfg | 5 +++++ 2 files changed, 12 insertions(+) diff --git a/phase1/master.cfg b/phase1/master.cfg index e57b666..2ccac8e 100644 --- a/phase1/master.cfg +++ b/phase1/master.cfg @@ -4,6 +4,7 @@ import os import re import base64 +import random import subprocess import configparser @@ -457,6 +458,12 @@ def GetNextBuild(builder, requests): return r return requests[0] +def prioritizeBuilders(buildmaster, builders): + random.shuffle(builders) + return builders + +c['prioritizeBuilders'] = prioritizeBuilders + def MakeEnv(overrides=None, tryccache=False): env = { 'CCC': Interpolate("%(kw:cc)s", cc=GetCC), diff --git a/phase2/master.cfg b/phase2/master.cfg index 1e1bafa..ac44fcd 100644 --- a/phase2/master.cfg +++ b/phase2/master.cfg @@ -4,6 +4,7 @@ import os import re import base64 +import random import subprocess import configparser @@ -318,7 +319,11 @@ def UsignSec2Pub(seckey, comment="untrusted comment: secret key"): def IsSharedWorkdir(step): return bool(step.getProperty("shared_wd")) +def prioritizeBuilders(buildmaster, builders): + random.shuffle(builders) + return builders +c['prioritizeBuilders'] = prioritizeBuilders c['builders'] = [] dlLock = locks.WorkerLock("worker_dl") -- 2.30.2