-
Notifications
You must be signed in to change notification settings - Fork 915
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: incident not resolved when alerts enriched from workflow #3897
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The latest updates on your projects. Learn more about Vercel for Git βοΈ 1 Skipped Deployment
|
e31a5ce
to
19e0792
Compare
081f25d
to
964d3d1
Compare
0b9b42f
to
d1a0d22
Compare
1048b10
to
a4f333c
Compare
Matvey-Kuk
reviewed
Mar 22, 2025
Matvey-Kuk
previously approved these changes
Mar 22, 2025
Replaces direct environment variable manipulation with `patch.dict` for better isolation in tests. Adds `sleep` in specific test cases to ensure reliable timing and session injection in incident routes for improved handling. Minor cleanup and consistency improvements across the codebase.
Centralized session management and introduced reusable methods for enriching alerts and handling disposable enrichments. Added logic to check and resolve incidents based on enrichment updates, improving maintainability and reducing code repetition.
Cleaned up unused imports to improve code readability and maintainability. This reduces unnecessary dependencies and potential confusion for future development.
Corrected a misspelling in the test function name from "elsatic" to "elastic" to ensure clarity and consistency. No functional changes were made to the test logic.
Reorganized import statements to follow a logical structure, improving code clarity and maintainability. No functional changes introduced in this commit.
Cleaned up unused imports (IncidentStatus, ResolveOn, ActionType) in `alerts.py` to improve code maintainability and readability. This change ensures only relevant dependencies remain in the module.
Reorganized imports by moving IncidentStatus to the correct module for better clarity and maintainability. This ensures proper separation of concerns and improved code readability.
Corrected the passing of the session parameter to ensure consistency and proper handling in incidents and enrichments components. Removed unnecessary session argument in `incidents.py` and added it to `enrichments_bl.py` for better alignment.
Eliminated unnecessary imports to clean up the code and improve readability. This change has no functional impact and preserves the script's behavior.
Align the indentation of the elastic_client fixture to improve readability and code consistency. No functional changes were made to the logic or behavior of the fixture.
74f29ae
to
f8189c9
Compare
This prevents objects from being expired immediately after a commit, ensuring smoother access to session-bound data while processing incidents. Adjusted formatting for better readability of the resolution condition.
Matvey-Kuk
approved these changes
Mar 24, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Closes #3821
π Description
β Checks
βΉ Additional Information