Alerting: Drop NamespaceID from responses on unstable ngalert API endpoints in favor of NamespaceUID #79359
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.
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:
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 orstable
marked portion of the ngalert API. This only breaks clients who are directly using the unstable portion of the API. Such clients should useNamespaceUID
rather thanNamespaceID
to identify namespaces.