Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Add incident resolution logic for enriched alerts #3185

Merged
merged 4 commits into from
Jan 29, 2025

Conversation

VladimirFilonov
Copy link
Contributor

Implemented logic to check and resolve incidents when all associated alerts are resolved. Updated the enrichment API to handle alert sessions and incident status changes. Enhanced test coverage to validate the new behavior.

Closes #3142

📑 Description

✅ Checks

  • My pull request adheres to the code style of this project
  • My code requires changes to the documentation
  • I have updated the documentation as required
  • All the tests have passed

ℹ Additional Information

Copy link

vercel bot commented Jan 28, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
keep ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 29, 2025 9:00am

@dosubot dosubot bot added size:M This PR changes 30-99 lines, ignoring generated files. Bug Something isn't working Incident labels Jan 28, 2025
Implemented logic to check and resolve incidents when all associated alerts are resolved. Updated the enrichment API to handle alert sessions and incident status changes. Enhanced test coverage to validate the new behavior.
Previously, resolution checks were triggered unconditionally. This change ensures that `should_check_incidents_resolution` is set to `True` only when the alert status is explicitly marked as "resolved," improving logic accuracy.
The import for `RulesEngine` in `alerts.py` was unused and has been removed to clean up the code. This helps maintain clarity and avoids unnecessary dependencies.
@VladimirFilonov VladimirFilonov force-pushed the fix/3142-bug-incident-is-not-closing-automatically branch from 7978d31 to 6cd5b0f Compare January 28, 2025 13:35
Copy link
Member

@talboren talboren left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LTGTM

@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Jan 29, 2025
@talboren talboren enabled auto-merge (squash) January 29, 2025 08:54
@talboren talboren merged commit f4898f7 into main Jan 29, 2025
12 of 14 checks passed
@talboren talboren deleted the fix/3142-bug-incident-is-not-closing-automatically branch January 29, 2025 09:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working Incident lgtm This PR has been approved by a maintainer size:M This PR changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[🐛 Bug]: Incident is not closing automatically
2 participants