[buildbot] buildmaster: replace horizons with JanitorConfigurator

LEDE Commits lede-commits at lists.infradead.org
Sat Mar 6 07:07:58 GMT 2021


ynezz pushed a commit to buildbot.git, branch master:
https://git.openwrt.org/a19b8e41f64cf3d2e61a235342f22495a8a47fb0

commit a19b8e41f64cf3d2e61a235342f22495a8a47fb0
Author: Petr Štetiar <ynezz at true.cz>
AuthorDate: Fri Mar 5 12:42:05 2021 +0100

    buildmaster: replace horizons with JanitorConfigurator
    
    The old c['logHorizon'] way of configuring is not supported anymore, we
    should use JanitorConfigurator. A new __Janitor builder will be created
    to help keep an eye on the cleanup activities and for that we need
    buildbot-worker package as well.
    
    Signed-off-by: Petr Štetiar <ynezz at true.cz>
---
 docker/buildmaster/Dockerfile | 1 +
 phase1/master.cfg             | 8 ++++++--
 phase2/master.cfg             | 8 ++++++--
 3 files changed, 13 insertions(+), 4 deletions(-)

diff --git a/docker/buildmaster/Dockerfile b/docker/buildmaster/Dockerfile
index 9e10041..1cf4d56 100644
--- a/docker/buildmaster/Dockerfile
+++ b/docker/buildmaster/Dockerfile
@@ -33,6 +33,7 @@ RUN \
 		"buildbot-waterfall-view==$BUILDBOT_VERSION" \
 		"buildbot-console-view==$BUILDBOT_VERSION" \
 		"buildbot-grid-view==$BUILDBOT_VERSION" \
+		"buildbot-worker==$BUILDBOT_VERSION" \
 		pyOpenSSL \
 		service_identity
 
diff --git a/phase1/master.cfg b/phase1/master.cfg
index b32096b..e01a1a5 100644
--- a/phase1/master.cfg
+++ b/phase1/master.cfg
@@ -7,6 +7,8 @@ import base64
 import subprocess
 import configparser
 
+from datetime import timedelta
+
 from buildbot import locks
 from buildbot.changes import filter
 from buildbot.changes.gitpoller import GitPoller
@@ -115,8 +117,10 @@ c['protocols'] = {'pb': {'port': slave_port}}
 c['collapseRequests'] = True
 
 # Reduce amount of backlog data
-c['buildHorizon'] = 30
-c['logHorizon'] = 20
+c['configurators'] = [util.JanitorConfigurator(
+    logHorizon=timedelta(days=3),
+    hour=6,
+)]
 
 ####### CHANGESOURCES
 
diff --git a/phase2/master.cfg b/phase2/master.cfg
index d3ad8b6..d1513c3 100644
--- a/phase2/master.cfg
+++ b/phase2/master.cfg
@@ -7,6 +7,8 @@ import base64
 import subprocess
 import configparser
 
+from datetime import timedelta
+
 from buildbot import locks
 from buildbot.changes import filter
 from buildbot.changes.gitpoller import GitPoller
@@ -107,8 +109,10 @@ c['protocols'] = {'pb': {'port': slave_port}}
 c['collapseRequests'] = True
 
 # Reduce amount of backlog data
-c['buildHorizon'] = 30
-c['logHorizon'] = 20
+c['configurators'] = [util.JanitorConfigurator(
+    logHorizon=timedelta(days=3),
+    hour=6,
+)]
 
 ####### CHANGESOURCES
 



More information about the lede-commits mailing list