phase1: AnyBranchScheduler: make treeStableTimer configurable
authorPetr Štetiar <ynezz@true.cz>
Wed, 12 Jun 2024 18:43:29 +0000 (18:43 +0000)
committerPaul Spooren <mail@aparcar.org>
Wed, 7 Aug 2024 08:03:06 +0000 (10:03 +0200)
The AnyBranchScheduler will currently wait for 15 minutes before
starting a build.  If new changes are made on the same branch during
this interval, the timer will be restarted.

For staging repository we want faster feedback loop, so we're going to
use much lower value, thus lets make this configurable and handled via
Ansible.

Signed-off-by: Petr Štetiar <ynezz@true.cz>
phase1/config.ini.example
phase1/master.cfg

index 0e4b551b5d3547b9df964b3ce19284d0048e3982..ced5ccb9dae2e2875622b14565abc2072810e6de 100644 (file)
@@ -19,6 +19,7 @@ password = example
 
 [repo]
 url = https://git.openwrt.org/openwrt/openwrt.git
+tree_stable_timer = 900
 
 # branches should be listed by decreasing build priority order, typically oldest branch first (less build intensive)
 # branch section name should match branch "name" option until signall.sh is reworked
index e8764bc52a840c6c9175e234d78bd9aa891a729e..4f767668ce8a2428241930dfdc6fd884ac6e7075 100644 (file)
@@ -61,6 +61,7 @@ work_dir = os.path.abspath(ini["general"].get("workdir", "."))
 scripts_dir = os.path.abspath("../scripts")
 
 repo_url = ini["repo"].get("url")
+tree_stable_timer = ini["repo"].getint("tree_stable_timer", 15 * 60)
 
 rsync_defopts = ["-v", "--timeout=120"]
 
@@ -509,7 +510,7 @@ c["schedulers"].append(
     AnyBranchScheduler(
         name="all",
         change_filter=util.ChangeFilter(branch=branchNames),
-        treeStableTimer=15 * 60,
+        treeStableTimer=tree_stable_timer,
         builderNames=builderNames,
     )
 )