From c922894567286652cbd7e01b9ca021ba83f9e9e9 Mon Sep 17 00:00:00 2001 From: Luc Didry Date: Fri, 24 Jan 2025 14:06:36 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20=E2=80=94=20Fix=20bug=20in=20ret?= =?UTF-8?q?ry=5Fbefore=5Fnotification=20logic?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGELOG.md | 2 ++ argos/server/alerting.py | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 070c573..a15d133 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,8 @@ ## [Unreleased] +- 🐛 — Fix bug in retry_before_notification logic + ## 0.7.1 Date: 2025-01-15 diff --git a/argos/server/alerting.py b/argos/server/alerting.py index 1145053..81b3a3d 100644 --- a/argos/server/alerting.py +++ b/argos/server/alerting.py @@ -56,7 +56,7 @@ def need_alert( task.contiguous_failures = task.retry_before_notification # Severity has not changed, but there has been enough failures # to create a notification - elif task.retry_before_notification == task.contiguous_failures: + elif task.retry_before_notification + 1 == task.contiguous_failures: send_notif = True return send_notif