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

Marker: Rename SetSilenced to SetActiveOrSilenced #2950

Merged
merged 2 commits into from
Jun 27, 2022

Conversation

gotjosh
Copy link
Member

@gotjosh gotjosh commented Jun 17, 2022

This accurately reflects what the function actually does. If no active silences IDs are provided and the list of inhibitions we have is already empty the alert is actually set to Active. Took me a while to realise this as I was understanding how do we populate the alert list.

While doing #2943 I was a bit puzzled as to where the active alerts are first introduced to memMarker, after carefully reading the interface I realised that a function named SetSilenced is actually used for that (!!). I'm not sure what our policy is and technically can be considered a breaking change so I'd like to hear opinions on whether this is worth it or not? At the very least the interface documentation is clear about it if we decided not to do this.

This accurately reflects what the function _actually_ does. If no active silences IDs are provided and the list of inhibitions we have is already empty the alert is actually set to Active. Took me a while to realise this as I was understanding how do we populate the alert list.

Signed-off-by: gotjosh <josue.abreu@gmail.com>
@gotjosh gotjosh force-pushed the change-set-silenced-func-name branch from 66044d0 to cfb909f Compare June 17, 2022 11:51
Signed-off-by: gotjosh <josue.abreu@gmail.com>
@gotjosh gotjosh force-pushed the change-set-silenced-func-name branch from ec0023f to f66bbab Compare June 17, 2022 12:20
@gotjosh gotjosh merged commit 3f3e2ce into prometheus:main Jun 27, 2022
@gotjosh gotjosh deleted the change-set-silenced-func-name branch June 27, 2022 10:01
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.

None yet

2 participants