Skip to content

fix: alertmanager user config disappearing when ring is unreachable #7372

Merged
friedrichg merged 6 commits intocortexproject:masterfrom
kishorekg1999:am-config-reset-fix
Mar 27, 2026
Merged

fix: alertmanager user config disappearing when ring is unreachable #7372
friedrichg merged 6 commits intocortexproject:masterfrom
kishorekg1999:am-config-reset-fix

Conversation

@kishorekg1999
Copy link
Copy Markdown
Contributor

What this PR does:
if the Cortex ring was temporarily unreachable, isUserOwned() incorrectly returned false instead of an error. This caused the loadAlertmanagerConfigs() to assume it no longer owned the user, triggering local config deletion and deleting the user's config from store - code ref.

Checklist

  • Tests updated
  • Documentation added
  • CHANGELOG.md updated - the order of entries should be [CHANGE], [FEATURE], [ENHANCEMENT], [BUGFIX]

…reachable

Signed-off-by: Kishore K G <kishorekg@google.com>
Signed-off-by: Kishore K G <kishorekg@google.com>
Signed-off-by: Kishore K G <kishorekg@google.com>
Signed-off-by: Kishore K G <kishorekg@google.com>
Signed-off-by: kishorekg1999 <kishorekg@google.com>
@kishorekg1999
Copy link
Copy Markdown
Contributor Author

kishorekg1999 commented Mar 25, 2026

@SungJin1212 @CharlieTLe @friedrichg can you please review the PR when you get a chance ? Thanks in advance !

Copy link
Copy Markdown
Member

@SungJin1212 SungJin1212 left a comment

Choose a reason for hiding this comment

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

Code is LGTM, I left just one nit.

@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Mar 26, 2026
Signed-off-by: kishorekg1999 <kishorekg.github@gmail.com>
Copy link
Copy Markdown
Member

@friedrichg friedrichg left a comment

Choose a reason for hiding this comment

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

one small nit

@friedrichg friedrichg merged commit 88c3622 into cortexproject:master Mar 27, 2026
35 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

component/alertmanager lgtm This PR has been approved by a maintainer size/L type/bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants