-
Notifications
You must be signed in to change notification settings - Fork 1
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: Telegram and issue reporting improvements #59
Open
Seth-Schmidt
wants to merge
17
commits into
main
Choose a base branch
from
feat/telegram-health-monitoring
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
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
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.
Fixes ##58
Checklist
Current behaviour
The implementation of the telegram issue reporting service is currently inconsistent with established internal patterns, and the handling of httpx clients used is incorrect/can be improved.
New expected behaviour
I have separated the telegram reporting logic from the reporting service's in
utils/callback_helpers.py
. Two new functions calledsend_telegram_notification_sync
andsend_telegram_notification_async
have been created. These will handle sending the notification message to the correct telegram service endpoint depending on the issue that was raised.An additional
httpx
client has been added to the core snapshotter services that opens a connection pool against the telegram reporting service endpoint. The telegram and reporting service notifications will now each have their own callback helpers and clients.The call to sleep in
system_event_detector
after_init_check_and_report()
has completed has also been removed.Change logs
Changed
utils/callback_helpers.py
system_event_detector.py
_send_telegram_epoch_processing_notification()
created to remove duplicate codeself._telegram_httpx_client
processor_distributor.py
_send_failure_notifications()
created to handle internal/telegram reporting and remove duplicate codeself._telegram_httpx_client
utils/generic_worker.py
_send_failure_notifications()
created to handle internal/telegram reporting and remove duplicate codeself._telegram_httpx_client
utils/snapshot_worker.py
utils/models/
message_models
fileRemoved
SnapshotterReportData
fromutils/models/data_models.py
Deployment Instructions
No changes to deployment.