-
Notifications
You must be signed in to change notification settings - Fork 14.6k
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
feat(reports): send notification on error with grace #13135
feat(reports): send notification on error with grace #13135
Conversation
…n-an-alert-errors-i
Codecov Report
@@ Coverage Diff @@
## master #13135 +/- ##
==========================================
+ Coverage 77.20% 79.97% +2.77%
==========================================
Files 872 300 -572
Lines 45101 24420 -20681
Branches 5435 0 -5435
==========================================
- Hits 34820 19530 -15290
+ Misses 10158 4890 -5268
+ Partials 123 0 -123
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
Code looks reasonable - would it be possible to add a link back to the alert in Superset to the error notification email? This would allow the user to quickly jump to the right place in the application to resolve the error. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Going forward I think adding an optional error recipient would be a good way of ensuring that alerts/reports with errors don't spam large recipient lists to whom the error may not be relevant.
…n-an-alert-errors-i
* fix: add config to disable dataset ownership on the old api * fix CI docker build * fix logic * add deprecation comment on the config * feat: send alerts reports errors to recipients * update * feat(reports): send notification on error with grace * merge and revert config * fix lint and MySQL test * fix mysql tests (cherry picked from commit 0b114fc)
* fix: add config to disable dataset ownership on the old api * fix CI docker build * fix logic * add deprecation comment on the config * feat: send alerts reports errors to recipients * update * feat(reports): send notification on error with grace * merge and revert config * fix lint and MySQL test * fix mysql tests (cherry picked from commit 0b114fc)
* fix: add config to disable dataset ownership on the old api * fix CI docker build * fix logic * add deprecation comment on the config * feat: send alerts reports errors to recipients * update * feat(reports): send notification on error with grace * merge and revert config * fix lint and MySQL test * fix mysql tests
SUMMARY
Sends a notification to all recipients when an Alert or Report errors. Also implements grace period on these error notifications.
Simple description of the state flow:
1 - Alert created
2 - Alert runs but with error (invalid SQL, bad db connection, etc)
2.1 - A notification is sent to all alert recipients
( next beat)
3 - Alert runs but with error
3.1 - If the last error notification was sent during the configured grace period, no notification is sent
Flappy alert state flow:
1 - Alert created
( next beat)
2 - Alert runs but with error (invalid SQL, bad db connection, etc)
2.1 - A notification is sent to all alert recipients
( next beat)
3 - Alert runs but with error
3.1 - If the last error notification was sent during the configured grace period, no notification is sent
4. User fixes the error
( next beat)
5. Alert triggers an alert (success state)
( next beat)
6. Alert exists grace period
7. User un-fixes alert
( next beat)
8 - Alert runs but with error (invalid SQL, bad db connection, etc)
8.1 - A notification is sent to all alert recipients
Example error email:
ADDITIONAL INFORMATION