[GH-ISSUE #533] subject filter: treat failure before success #386

Closed
opened 2026-02-25 23:42:16 +03:00 by kerem · 0 comments
Owner

Originally created by @swoga on GitHub (Jun 21, 2021).
Original GitHub issue: https://github.com/healthchecks/healthchecks/issues/533

Currently, an inbound email is treated as successful if one success keyword matches without checking the failure keywords.
What do you think about reversing this if-statement? I think this would lead to more expected behavior (failure before success).

github.com/healthchecks/healthchecks@6c8b6a2a19/hc/api/management/commands/smtpd.py (L48-L51)

Example of backup software subjects

Success Keywords: Successful
Failure Keywords: Failed, Issue, Warning

Subject Current behaviour Expected behaviour
2 Successful Backups Success Success
2 Failed Offsite Copies Failure Failure
1 Successful Backup, 1 Failed Offsite Copy Success Failure <--
Originally created by @swoga on GitHub (Jun 21, 2021). Original GitHub issue: https://github.com/healthchecks/healthchecks/issues/533 Currently, an inbound email is treated as successful if one success keyword matches without checking the failure keywords. What do you think about reversing this if-statement? I think this would lead to more expected behavior (failure before success). https://github.com/healthchecks/healthchecks/blob/6c8b6a2a19f25eaac84e15f59c082b91ef123534/hc/api/management/commands/smtpd.py#L48-L51 ## Example of backup software subjects Success Keywords: Successful Failure Keywords: Failed, Issue, Warning | Subject | Current behaviour | Expected behaviour | |---|---|---| | 2 Successful Backups | Success | Success | | 2 Failed Offsite Copies | Failure | Failure | | 1 Successful Backup, 1 Failed Offsite Copy | **Success** | **Failure** <-- |
kerem closed this issue 2026-02-25 23:42:16 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/healthchecks#386
No description provided.