Fix MaxSilenceSizeBytes limit causes incomplete updates of existing silences#3897
Merged
gotjosh merged 1 commit intoprometheus:mainfrom Jun 25, 2024
Conversation
0ea534d to
4c272b7
Compare
6d94575 to
698f3b2
Compare
caf0a48 to
fa74725
Compare
…ilences This commit fixes a bug where the MaxSilenceSizeBytes limit can cause an incomplete update of existing silences, where the old silence can be expired but the new silence cannot be created because it would exceed the maximum size limit. Signed-off-by: George Robinson <george.robinson@grafana.com>
fa74725 to
c3f442c
Compare
gotjosh
approved these changes
Jun 25, 2024
grobinson-grafana
added a commit
to grobinson-grafana/alertmanager
that referenced
this pull request
Jun 25, 2024
…ilences (prometheus#3897) This commit fixes a bug where the MaxSilenceSizeBytes limit can cause an incomplete update of existing silences, where the old silence can be expired but the new silence cannot be created because it would exceed the maximum size limit. Signed-off-by: George Robinson <george.robinson@grafana.com>
grobinson-grafana
added a commit
to grafana/mimir
that referenced
this pull request
Jun 26, 2024
This commit fixes the following bugs in silences: - prometheus/alertmanager#3877 - prometheus/alertmanager#3898 - prometheus/alertmanager#3897 which could cause an existing silence to be deleted/expired when updating the silence failed. This could be because the replacing silence exceeded limits or was invalid.
4 tasks
grobinson-grafana
added a commit
to grafana/mimir
that referenced
this pull request
Jun 26, 2024
This commit fixes the following bugs in silences: - prometheus/alertmanager#3877 - prometheus/alertmanager#3898 - prometheus/alertmanager#3897 which could cause an existing silence to be deleted/expired when updating the silence failed. This could be because the replacing silence exceeded limits or was invalid.
grobinson-grafana
added a commit
to grafana/mimir
that referenced
this pull request
Jun 26, 2024
This commit fixes the following bugs in silences: - prometheus/alertmanager#3877 - prometheus/alertmanager#3898 - prometheus/alertmanager#3897 which could cause an existing silence to be deleted/expired when updating the silence failed. This could be because the replacing silence exceeded limits or was invalid. additional tests in upstream.
grobinson-grafana
added a commit
to grafana/mimir
that referenced
this pull request
Jun 26, 2024
This commit fixes the following bugs in silences: - prometheus/alertmanager#3877 - prometheus/alertmanager#3898 - prometheus/alertmanager#3897 which could cause an existing silence to be deleted/expired when updating the silence failed. This could be because the replacing silence exceeded limits or was invalid.
dimitarvdimitrov
pushed a commit
to grafana/mimir
that referenced
this pull request
Jul 2, 2024
This commit fixes the following bugs in silences: - prometheus/alertmanager#3877 - prometheus/alertmanager#3898 - prometheus/alertmanager#3897 which could cause an existing silence to be deleted/expired when updating the silence failed. This could be because the replacing silence exceeded limits or was invalid. (cherry picked from commit 1cfb657)
dimitarvdimitrov
added a commit
to grafana/mimir
that referenced
this pull request
Jul 2, 2024
* Fixes a number of bugs in silences (#8525) This commit fixes the following bugs in silences: - prometheus/alertmanager#3877 - prometheus/alertmanager#3898 - prometheus/alertmanager#3897 which could cause an existing silence to be deleted/expired when updating the silence failed. This could be because the replacing silence exceeded limits or was invalid. (cherry picked from commit 1cfb657) * Update CHANGELOG.md (#8526) (cherry picked from commit 36f7af3) --------- Co-authored-by: George Robinson <george.robinson@grafana.com>
TheMeier
pushed a commit
to TheMeier/alertmanager
that referenced
this pull request
Sep 29, 2024
…ilences (prometheus#3897) This commit fixes a bug where the MaxSilenceSizeBytes limit can cause an incomplete update of existing silences, where the old silence can be expired but the new silence cannot be created because it would exceed the maximum size limit. Signed-off-by: George Robinson <george.robinson@grafana.com>
tjhop
pushed a commit
to tjhop/alertmanager
that referenced
this pull request
Nov 13, 2025
…ilences (prometheus#3897) This commit fixes a bug where the MaxSilenceSizeBytes limit can cause an incomplete update of existing silences, where the old silence can be expired but the new silence cannot be created because it would exceed the maximum size limit. Signed-off-by: George Robinson <george.robinson@grafana.com>
This file contains hidden or 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.
This commit fixes a bug where the
MaxSilenceSizeByteslimit can cause an incomplete update of existing silences, where the old silence can be expired but the new silence cannot be created because it would exceed the maximum size limit.I moved
sil.UpdatedAt = nowout ofsetSilenceand intoSetandExpirebecause we want to make sure theUpdatedAttimestamp is calculated in the size when we callcheckSizeLimits. Forget to setsil.UpdatedAtin either of these places and the following tests fail: