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

feat: change alertmanagerAPIPath to v2 #7928

Closed
wants to merge 1 commit into from
Closed

feat: change alertmanagerAPIPath to v2 #7928

wants to merge 1 commit into from

Conversation

jsedy7
Copy link

@jsedy7 jsedy7 commented Apr 22, 2024

What this PR does

This change responds to the recent Alertmanager upgrade, where the deprecation of the api/v1 path was announced in version 0.27.0 Alertmanager-PR2970. From version 0.28.0, Alertmanager plans to drop this path, hence I am making this small change for Mimirtool, which currently uses the deprecated path.

[CHANGE] Alertmanager: Deprecates the v1 API. All v1 API endpoints now respond with a JSON deprecation notice and a status code of 410. All endpoints have a v2 equivalent. The list of endpoints is: #7103

The new Mimir version 2.12.0 also announced a change to the Alertmanager V1 API in the changelog, so it seems appropriate to have this change ready for the next release.

Which issue(s) this PR fixes or relates to

Fixes #

Checklist

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

@jsedy7 jsedy7 requested a review from a team as a code owner April 22, 2024 07:13
@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.


Jiří Šedý seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You have signed the CLA already but the status is still pending? Let us recheck it.

@@ -15,7 +15,7 @@ import (
"gopkg.in/yaml.v3"
)

const alertmanagerAPIPath = "/api/v1/alerts"
const alertmanagerAPIPath = "/api/v2/alerts"
Copy link
Contributor

@alexweav alexweav May 3, 2024

Choose a reason for hiding this comment

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

The only APIs that moved to V2 are the ones inside prometheus alertmanager itself - i.e. the ones hosted under the /alertmanager subpath.

Mimir's APIs for managing alertmanager configuration (/api/v1/alerts, different from /alertmanager/api/v1/alerts confusingly) are not deprecated and are still V1. So, /api/v1/alerts is still correct - I think this may cause mimirtool to try to also edit configuration against endpoints that don't exist.

@56quarters
Copy link
Contributor

Given @alexweav's explanation, I'm going to close this PR. Please reopen if you think there's been a mistake!

@56quarters 56quarters closed this May 7, 2024
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.

4 participants