From d88bee536165d4d733dbc5925e2b7b631e9d4e99 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20=C5=A0tetiar?= Date: Wed, 12 Jun 2024 18:43:29 +0000 Subject: [PATCH] phase1: AnyBranchScheduler: make treeStableTimer configurable MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- phase1/config.ini.example | 1 + phase1/master.cfg | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/phase1/config.ini.example b/phase1/config.ini.example index 0e4b551..ced5ccb 100644 --- a/phase1/config.ini.example +++ b/phase1/config.ini.example @@ -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 diff --git a/phase1/master.cfg b/phase1/master.cfg index e8764bc..4f76766 100644 --- a/phase1/master.cfg +++ b/phase1/master.cfg @@ -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, ) )