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

Alerting: Drop NamespaceID from responses on unstable ngalert API endpoints in favor of NamespaceUID #79359

Merged
merged 6 commits into from Dec 15, 2023

Conversation

alexweav
Copy link
Contributor

@alexweav alexweav commented Dec 11, 2023

What is this feature?

NamespaceID is just another name for the numeric folder ID, which is deprecated both internally and externally in favor of folder UID. Reading rules from the unstable ngalert API currently returns both the UID and old ID.

We can directly remove the ID, due to these APIs not being marked as stable, reducing the API surface where this deprecated field appears, and reducing areas where the field needs to be propagated.

This field does not appear on any stable endpoints, so this does not affect the stable documented API.

Which issue(s) does this PR fix?:

n/a

Special notes for your reviewer:

Please check that:

  • It works as expected from a user's perspective.
  • If this is a pre-GA feature, it is behind a feature toggle.
  • The docs are updated, and if this is a notable improvement, it's added to our What's New doc.

Release notice breaking change

Removes NamespaceID from responses of all GET routes underneath the path /api/ruler/grafana/api/v1/rules - 3 affected endpoints. All affected routes are not in the publicly documented or stable marked portion of the ngalert API. This only breaks clients who are directly using the unstable portion of the API. Such clients should use NamespaceUID rather than NamespaceID to identify namespaces.

@alexweav alexweav added area/alerting Grafana Alerting area/backend add to changelog breaking change Relevant for changelog generation no-backport Skip backport of PR labels Dec 11, 2023
@alexweav alexweav added this to the 10.3.x milestone Dec 11, 2023
@alexweav alexweav marked this pull request as ready for review December 11, 2023 20:53
@alexweav alexweav requested review from a team as code owners December 11, 2023 20:53
@alexweav alexweav requested review from rwwiv, JacobsonMT, yuri-tceretian and grobinson-grafana and removed request for a team December 11, 2023 20:53
Copy link
Contributor

@yuri-tceretian yuri-tceretian left a comment

Choose a reason for hiding this comment

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

LGTM! Finally we will get rid of this field!

@alexweav alexweav merged commit cf8e885 into main Dec 15, 2023
17 checks passed
@alexweav alexweav deleted the alexweav/drop-namespace-id branch December 15, 2023 17:06
@summerwollin summerwollin modified the milestones: 10.3.x, 10.3.0 Jan 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
add to changelog area/alerting Grafana Alerting area/backend area/frontend breaking change Relevant for changelog generation no-backport Skip backport of PR
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

None yet

3 participants