From 1cf1752a80b31cec02c0c5eca73c414632481be5 Mon Sep 17 00:00:00 2001 From: Michael Biarnes Kiefer Date: Wed, 4 Dec 2024 12:15:44 +0100 Subject: [PATCH] ART-11446: images-health should report failures only when fail count > 1 rh-pre-commit.version: 2.3.2 rh-pre-commit.check-secrets: ENABLED --- doozer/doozerlib/cli/images_health.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doozer/doozerlib/cli/images_health.py b/doozer/doozerlib/cli/images_health.py index d92e4782f..b2233e76a 100644 --- a/doozer/doozerlib/cli/images_health.py +++ b/doozer/doozerlib/cli/images_health.py @@ -100,8 +100,8 @@ async def get_concerns(self, image_meta): msg = (f'Latest attempt {self.url_text(latest_attempt_task_url, "failed")} ' f'({self.url_text(latest_attempt_build_url, "jenkins job")}); ') - # The latest attempt was a failure - if latest_success_idx == -1: + # The last success is greater then the last attempt + if latest_success_idx > 1: # No success record was found msg += f'Failing for at least the last {len(builds)} attempts / {oldest_attempt_bi_dt}' else: