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

add private method to reinitialize alerts #76

Merged
merged 6 commits into from
Jan 26, 2022
Merged

Conversation

sed-i
Copy link
Contributor

@sed-i sed-i commented Jan 24, 2022

This PR adds a private method for refreshing (re-initializing) relation data for alerts.
This is needed for cos-config to be able to refresh alerts when alerts show up on disk after the last hook fired.

cf. canonical/prometheus-k8s-operator#208, canonical/grafana-k8s-operator#53

Copy link
Contributor

@dstathis dstathis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems to adding a new method and calling it nowhere. Could you explain?

I should have read your first comment.

dstathis
dstathis previously approved these changes Jan 24, 2022
Copy link
Contributor

@mmanciop mmanciop left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code looks reasonable, please add a few unit tests to make sure it works as we expect when we do add, change or remove alert rules.

Copy link
Contributor

@mmanciop mmanciop left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR description needs update (method no longer public), the rest LGTM

@sed-i sed-i changed the title add refresh method add private method to reinitialize alerts Jan 25, 2022
@simskij simskij merged commit 7d704b1 into main Jan 26, 2022
@simskij simskij deleted the feature/extra_listen_event branch January 26, 2022 14:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants