From 4384099bc29e4eeffae9aea4eb1361e792ee1bea Mon Sep 17 00:00:00 2001 From: Sergi Blanch Torne Date: Fri, 2 Jan 2026 23:32:26 +0100 Subject: [PATCH] ci,crnm: inhibit pretty_wait within a GitLab job MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Added in 411110f7 as part of !39105 an argument to define the polling period to monitor a pipeline and check if there are jobs to be enabled. Part of this MR, 8cf2c50e, also includes changes to improve the experience when using this tool within a GitLab job. But the pretty_wait method, meant to show a heartbeat to the user, is disturbing the job traces as '\r' is useless in a non-terminal console. Signed-off-by: Sergi Blanch Torne Part-of: --- bin/ci/ci_run_n_monitor.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/bin/ci/ci_run_n_monitor.py b/bin/ci/ci_run_n_monitor.py index b1967f24fcd..46aafa0ec17 100755 --- a/bin/ci/ci_run_n_monitor.py +++ b/bin/ci/ci_run_n_monitor.py @@ -111,6 +111,9 @@ def job_duration(job: gitlab.v4.objects.ProjectPipelineJob) -> float: def pretty_wait(sec: int) -> None: """shows progressbar in dots""" + if is_gitlab_job(): + time.sleep(sec) + return for val in range(sec, 0, -1): print(f"⏲ {val:2d} seconds", end="\r") # U+23F2 Timer clock time.sleep(1)