-
Notifications
You must be signed in to change notification settings - Fork 12.1k
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: Support deleting rule groups in the provisioning API #83514
Conversation
Adds support for DELETE to the provisioning API's alert rule groups route, which allows deleting the rule group with a single API call. Previously, groups were deleted by deleting rules one-by-one. Fixes #81860
Could someone please help me generate the updated swagger documentation for this branch? go-swagger is panicking on me and I can't seem to track the problem down.
|
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.
LGTM, there's a test failure due to path count but looks like the all the added tests are succeeding.
@@ -40,7 +40,7 @@ func TestAuthorize(t *testing.T) { | |||
} | |||
paths[p] = methods | |||
} | |||
require.Len(t, paths, 64) | |||
require.Len(t, paths, 65) |
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.
Test is failing when this was bumped, looks like we don't count all methods?
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.
The output looks like this:
/ruler/grafana/api/v1/rules/{Namespace}:[GET POST DELETE] /ruler/grafana/api/v1/rules/{Namespace}/export:[POST] /ruler/grafana/api/v1/rules/{Namespace}/{Groupname}:[GET DELETE]
, and this change only adds a new method, not a new path. I wouldn't expect this number to increase for this change.
This change doesn't add any new paths to the API, only new methods.
Tests are looking green. @yuri-tceretian could you merge when you're available? |
Adds support for DELETE to the provisioning API's alert rule groups route, which allows deleting the rule group with a single API call. Previously, groups were deleted by deleting rules one-by-one.
Fixes #81860
Special notes for your reviewer:
Please check that: