From 48bccb7d55633d8d53e15397bbec2bc7a64c6135 Mon Sep 17 00:00:00 2001 From: Sergi Blanch Torne Date: Thu, 17 Apr 2025 23:50:01 +0200 Subject: [PATCH] bin/ci: crnm: bug stress mode retry formula MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The execution_times structure was filled the same way in all the cases of an if. As a side effect, the retry evaluation doesn't include the last result and can lead, as a race condition, into triggering one extra time than the indication in the stress argument. Signed-off-by: Sergi Blanch Torne Reviewed-by: Guilherme Gallo Part-of: --- bin/ci/ci_run_n_monitor.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/bin/ci/ci_run_n_monitor.py b/bin/ci/ci_run_n_monitor.py index aedc36d2112..6f35d2da8f3 100755 --- a/bin/ci/ci_run_n_monitor.py +++ b/bin/ci/ci_run_n_monitor.py @@ -122,17 +122,16 @@ def run_target_job( target_statuses: dict, name_field_pad: int, ) -> None: + execution_times[job.name][job.id] = (job_duration(job), job.status, job.web_url) if stress and job.status in COMPLETED_STATUSES: if ( stress < 0 or len(execution_times[job.name]) < stress ): - execution_times[job.name][job.id] = (job_duration(job), job.status, job.web_url) enable_job_fn(job=job, action_type="retry") # Wait for the next loop to get the updated job object return else: - execution_times[job.name][job.id] = (job_duration(job), job.status, job.web_url) enable_job_fn(job=job, action_type="target") print_job_status(job, job.status not in target_statuses[job.name], name_field_pad)