Conversation
4f1094a to
6c86436
Compare
090f514 to
b016824
Compare
There was a problem hiding this comment.
Pull Request Overview
This pull request introduces monitor variable support by adding new functions to set and get monitor-specific variables and updating the monitor configuration with identification attributes. Key changes include:
- Adding the functions set_variable and get_variable along with comprehensive tests.
- Updating the monitor configuration (_configure_monitor) to set SENTINELA_MONITOR_ID, SENTINELA_MONITOR_NAME, and SENTINELA_MONITOR_PATH.
- Adding a migration for the new Variables table and updating documentation to describe the usage of these functions.
Reviewed Changes
Copilot reviewed 15 out of 15 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/utils/test_stack.py | Added tests to validate the get_caller behavior. |
| tests/sample_monitor_code.py | Introduced a new call_function helper for asynchronous execution within monitors. |
| tests/monitor_utils/test_variables.py | Added tests covering various scenarios for setting and retrieving monitor variables. |
| tests/models/test_variable.py | Added tests to verify the Variable model’s set method and timestamp updates. |
| tests/conftest.py | Updated monitor fixture to set new monitor identification attributes. |
| tests/components/monitors_loader/test_monitors_loader.py | Updated tests to reflect changes in monitor configuration parameters. |
| src/utils/stack.py | Added the get_caller function with detailed stack logging. |
| src/monitor_utils/variables.py | Implemented set_variable and get_variable functions that rely on get_caller. |
| src/components/monitors_loader/monitors_loader.py | Modified _configure_monitor to accept and assign monitor identification attributes. |
| migrations/versions/…_create_variables_table.py | Introduced a migration to create the Variables table. |
| docs/monitor.md | Expanded documentation with a new section for monitor variables. |
b016824 to
154f33c
Compare
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.
No description provided.