buildmaster: replace horizons with JanitorConfigurator
authorPetr Štetiar <ynezz@true.cz>
Fri, 5 Mar 2021 11:42:05 +0000 (12:42 +0100)
committerPetr Štetiar <ynezz@true.cz>
Fri, 5 Mar 2021 15:11:31 +0000 (16:11 +0100)
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@true.cz>
docker/buildmaster/Dockerfile
phase1/master.cfg
phase2/master.cfg

index 9e10041d201f820f4f885cdd934f4dbcb9429335..1cf4d566974726d8f794731a6c05654054ace9cb 100644 (file)
@@ -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
 
index b32096bad144d212791c265b9bda9ab6383d567d..e01a1a5468da4d000c57325325a06fdc6492dc8c 100644 (file)
@@ -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
 
index d3ad8b6841ff1a689deb2cf0b379767829ce247f..d1513c3d0ab85fe611f22fad1171dfd078ad96a3 100644 (file)
@@ -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