test: document/illustrate notification behavior for muted alerts - #5470
test: document/illustrate notification behavior for muted alerts#5470suprjinx wants to merge 5 commits into
Conversation
The mute stages remove muted alerts from the pipeline before the dedup stage runs, so muted alerts never reach the notification log and a group's notification history has no way to represent them. Pin the resulting semantics before changing them, so that a later change shows up as an explicit diff of these expectations. The tests assert the behavior as it is, not as it should be, including the bug reported in - MuteStage already records muted alert hashes in the context, but the time interval stages do not. - MultiStage short-circuits once the mute stage has emptied the group, so the dedup stage never observes "all alerts are muted". - A muted alert is dropped from the notification log entry the next time the group is notified about, even though it is still firing. - An alert that was notified about and is then muted never produces the matching resolved notification (prometheus#226), unit tested and end to end. - A group with a muted alert is reported as entirely resolved while that alert is still firing, and the alert then opens a new sequence once it is unmuted (prometheus#5247). Test only, no mainline code changes. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Signed-off-by: Geoff Wilson <geoff@gr-oss.io>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
💤 Files with no reviewable changes (1)
Included review availability: Your plan provides up to 8 included reviews per hour; 7 remain after this review. 📝 WalkthroughWalkthroughThe change adds unit tests for muted-alert handling across notification stages and deduplication. It also adds an API acceptance test that verifies silenced alerts do not generate resolved notifications. ChangesMuted alert notification behavior
Estimated code review effort: 3 (Moderate) | ~20 minutes Merge Risk: ⚪ Minimal · up to This tests-only change documents existing muted-alert behavior and introduces no production behavior changes; no actionable merge-blocking risk remains after normal checks and review. 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
Full details: Description checkExplanation The description explains the tests-only scope, documents the covered muted-alert behaviors, references related issues, and includes the repository checklist. The empty release-notes block is a minor omission because the description states that there are no user-facing changes. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Signed-off-by: Geoff Wilson <geoff@gr-oss.io>
Spaceman1701
left a comment
There was a problem hiding this comment.
Thank you for the contribution, these look very good!
| func boolPtr(b bool) *bool { | ||
| return &b | ||
| } | ||
|
|
||
| func stringPtr(s string) *string { | ||
| return &s | ||
| } | ||
|
|
||
| func dateTimePtr(t strfmt.DateTime) *strfmt.DateTime { | ||
| return &t | ||
| } |
There was a problem hiding this comment.
It looks like these are unused. (this is the source of the linter failures in CI).
Signed-off-by: Geoff Wilson <geoff@gr-oss.io>
…suprjinx/alertmanager into characterize-muted-alert-notifications
|
/workflow-approve |
This is a tests-only PR that documents and illustrates the current behavior of muted alerts in the notify pipeline. It's expected that these tests will continue to pass when feature-flagged changes are introduced.
Assisted-by: Claude Code
Pull Request Checklist
Please check all the applicable boxes.
Please list all open issue(s) discussed with maintainers related to this change
Is this a new Receiver integration?
Is this a bugfix?
Is this a new feature?
Does this change affect performance?
benchstatto compare benchmarksIs this a breaking change?
I have added/updated the required documentation
I have signed-off my commits
I will follow best practices for contributing to this project
Which user-facing changes does this PR introduce?