Skip to content
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(alerting): Use reflection to set invalid providers to nil instead of re-validating on every alert trigger/resolve #386

Merged
merged 3 commits into from
Dec 16, 2022

Conversation

TwiN
Copy link
Owner

@TwiN TwiN commented Dec 16, 2022

Summary

Instead of re-validating the corresponding alerting provider of an alert every time said alert is triggered/resolved, use reflection to set the alerting configuration's provider field to nil

Checklist

  • Tested and/or added tests to validate that the changes work as intended, if applicable.
  • Added the documentation in README.md, if applicable.

… of re-validating on every alert trigger/resolve
@TwiN TwiN added area/alerting Related to alerting bug Something isn't working labels Dec 16, 2022
@codecov-commenter
Copy link

Codecov Report

Base: 82.04% // Head: 82.04% // Increases project coverage by +0.00% 🎉

Coverage data is based on head (bba7ad6) compared to base (9acace7).
Patch coverage: 100.00% of modified lines in pull request are covered.

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #386   +/-   ##
=======================================
  Coverage   82.04%   82.04%           
=======================================
  Files          54       54           
  Lines        4065     4066    +1     
=======================================
+ Hits         3335     3336    +1     
  Misses        574      574           
  Partials      156      156           
Impacted Files Coverage Δ
config/config.go 73.11% <100.00%> (+0.14%) ⬆️
watchdog/alerting.go 89.83% <100.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@TwiN TwiN merged commit 51255e3 into master Dec 16, 2022
@TwiN TwiN deleted the fix/use-reflection-to-set-bad-providers-to-nil branch December 16, 2022 02:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/alerting Related to alerting bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants