Open
Conversation
Collaborator
tansdf
commented
Jan 28, 2026
- Introduced InhibitionManager to manage inhibition rules and track source/target incidents.
- Added InhibitRule model for defining inhibition rules in configuration.
- Enhanced Incident class to support inhibition-related properties and methods.
- Updated AsyncQueueManager and related handlers to integrate inhibition management.
- Refactored setup_sighup_handler to reload inhibition rules on configuration changes.
- Improved test coverage for queue management and inhibition handling.
- Introduced InhibitionManager to manage inhibition rules and track source/target incidents. - Added InhibitRule model for defining inhibition rules in configuration. - Enhanced Incident class to support inhibition-related properties and methods. - Updated AsyncQueueManager and related handlers to integrate inhibition management. - Refactored setup_sighup_handler to reload inhibition rules on configuration changes. - Improved test coverage for queue management and inhibition handling.
… on inhibition state. This change ensures that chain functionality is only disabled when the incident is not unfrozen due to inhibition.
- Introduced mock InhibitionManager in various test cases to improve testing of incident handling. - Updated AlertHandler, StatusUpdateHandler, and StatusCheckHandler to utilize the new mock for better simulation of inhibition logic. - Enhanced create_mock_incident_for_handlers to include frozen_by_inhibition property for more accurate incident state representation. - Improved test coverage for handlers by ensuring they correctly initialize with the mock InhibitionManager.
…ger classes - Introduced comprehensive test cases for the new inhibition features in the Incident class, including freezing and unfreezing incidents based on inhibition. - Added tests for the InhibitionManager class to validate the processing of incidents and the enforcement of inhibition rules. - Enhanced existing tests to cover scenarios involving inhibition-related fields and their serialization. - Created a new test suite for InhibitionRule to ensure proper matching logic for source and target incidents. - Improved test coverage for unfreeze handling, ensuring correct behavior for both time-based and inhibition-based unfreezes.
- Updated the Application class and its subclasses to include a new parameter, `frozen_by_inhibition`, in the `update_thread_payload` method, allowing for better handling of incidents frozen due to inhibition rules. - Modified the action button configurations in Mattermost, Slack, and Telegram to display an "Inhibited" state when incidents are frozen by inhibition. - Implemented logic in the `build_mattermost_actions` and `build_slack_actions` functions to conditionally render buttons based on the `frozen_by_inhibition` status. - Enhanced the InhibitionManager to check if an incident would be inhibited, affecting thread creation in the messenger. - Updated templates for status icons to reflect the new inhibition state, ensuring accurate representation in the UI. - Improved logging for incident processing to include details about inhibition status during updates.
…n_by_inhibition` parameter - Modified test cases in Mattermost and Slack applications to pass the new `frozen_by_inhibition` argument in the `update_thread_payload` method. - Ensured that mock payload assertions reflect the updated method signature, maintaining test integrity and coverage for the inhibition functionality.
- Updated the AlertHandler class to include methods for regenerating incident chains and checking alert changes, improving the handling of incident states. - Introduced logic to manage inhibition state changes and create threads for previously inhibited incidents, ensuring accurate incident processing. - Refactored existing methods to streamline alert handling and improve clarity, while maintaining functionality for frozen incidents and alert notifications.
- renamed target to target_matchers - update Matcher regex
- Updated the Application class and its subclasses to include a new parameter, `frozen_by_inhibition`, in the `_create_thread_payload` method, allowing for better management of thread creation based on incident inhibition status. - Modified the Mattermost and Slack applications to reflect the new parameter in their respective thread payload functions. - Adjusted the Telegram application to incorporate the inhibition state in thread creation, ensuring consistent behavior across messaging platforms. - Enhanced the `mattermost_get_create_thread_payload` and `slack_get_create_thread_payload` functions to conditionally display the status based on the `frozen_by_inhibition` flag. - Improved the AlertHandler to create threads with the inhibition state, ensuring accurate incident processing and logging.
- Modified test cases in Mattermost and Slack applications to include the new `frozen_by_inhibition` parameter in the `_create_thread_payload` method. - Updated mock payload assertions to match the revised method signatures, ensuring accurate testing of thread creation with inhibition support. - Adjusted the InhibitionManager tests to utilize `source_matchers` and `target_matchers` for consistency in rule definitions.
- Added logic to delete the target from the queue by its unique ID when it is frozen by inhibition, ensuring proper management of the inhibition state.
- Modified multiple test cases to incorporate the mock_queue parameter, ensuring that the deletion of chain steps for targets is properly asserted when incidents are frozen. - Enhanced assertions to verify that the queue's delete_by_id method is called with the correct parameters, maintaining accurate testing of the inhibition functionality.
- Introduced methods in JinjaTemplate to set incidents and build incident data, allowing templates to resolve parent and child incident relationships. - Updated the form_message and render methods to utilize the new incident data structure. - Enhanced tests to verify the correct resolution of parent and child incidents in template rendering, ensuring robust functionality and error handling for non-serializable incidents.
…spec - Updated test cases to utilize a MockIncident class that adheres to the Incident specification, enhancing test reliability. - Adjusted the mock incident setup to include serialization and properties for parents and children, ensuring accurate representation in template rendering. - Improved clarity and maintainability of tests by consolidating mock logic.
- Removed redundant check for inhibition before processing incidents, ensuring that all incidents are processed consistently. - Updated logging to reflect the creation of incidents without unnecessary duplication of processing logic.
- Modified Mattermost and Slack thread action builders to set the `chain_style` to 'default' and 'normal' respectively when `frozen_by_inhibition` is true, ensuring consistent visual representation of inhibited threads. - Enhanced error logging in the AsyncQueueManager to include error details in a structured format, improving debugging capabilities.
- Deleted the test_client_creation method as it was deemed unnecessary for the current test suite, streamlining the test code and improving maintainability.
|
This file contains hidden or 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
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.


