-
Notifications
You must be signed in to change notification settings - Fork 537
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
Fixes a number of bugs in silences #8525
Conversation
@@ -63,7 +63,7 @@ require ( | |||
github.com/google/go-github/v57 v57.0.0 | |||
github.com/google/uuid v1.6.0 | |||
github.com/grafana-tools/sdk v0.0.0-20220919052116-6562121319fc | |||
github.com/grafana/alerting v0.0.0-20240607182251-835aff588914 | |||
github.com/grafana/alerting v0.0.0-20240626080128-8299cb22b8df |
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.
This comes from here. It is a branch that has two commits on top of 835aff5
to avoid bringing in the changes from #8515 while it is still in review.
The changes in this branch are cherry-picked from main
, and were reviewed by @yuri-tceretian:
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.
@santihernandezc asked me why do this instead of using main
from grafana/alerting
. My reasoning for this was so I don't have to bring in changes from #8515 for the bug fix as I don't know if and when that PR will be approved. If you consider this to be unnecessary I will happily update the PR to use main
.
4b775a1
to
162a7c8
Compare
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.
fe93431
to
d84bd0d
Compare
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 🎉
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.
Approving since this touches integration/
which requires a maintainer approval. I am relying on alerting team members to review the rest of the changes.
The backport to
To backport manually, run these commands in your terminal: # Fetch latest updates from GitHub
git fetch
# Create a new branch
git switch --create backport-8525-to-release-2.13 origin/release-2.13
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x 1cfb65777a4dbf21c85b1467e67b925e32e3042e
# Push it to GitHub
git push --set-upstream origin backport-8525-to-release-2.13
git switch main
# Remove the local backport branch
git branch -D backport-8525-to-release-2.13 Then, create a pull request where the |
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)
* 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 <[email protected]>
What this PR does
This commit fixes the following bugs in silences:
which could cause an existing silence to be deleted/expired when updating the silence failed. This can happen when the replacing silence exceeded limits or was invalid.
Which issue(s) this PR fixes or relates to
Here are some screenshots showing the broken behavior, where an existing silence is expired because the limit was reached:
And here is the same update performed with the fix:
You can see the original silence is kept. This has also been tested for invalid silences and silences which are too large (exceed maximum size limit):
Checklist
CHANGELOG.md
updated - the order of entries should be[CHANGE]
,[FEATURE]
,[ENHANCEMENT]
,[BUGFIX]
.about-versioning.md
updated with experimental features.