CNV-80440: add alert rule preview API - #28
Closed
sradco wants to merge 1 commit into
Closed
Conversation
sradco
force-pushed
the
alert-mgmt-rule-preview
branch
from
August 25, 2026 12:38
f134798 to
5435e21
Compare
Add POST /api/v1/alerting/rules/preview for create and update dry-run. Share planning logic with execute paths, return multi-resource change plans with desiredObject, and add unit plus e2e RBAC coverage. Signed-off-by: Shirly Radco <sradco@redhat.com> Co-authored-by: AI Assistant <noreply@cursor.com>
sradco
force-pushed
the
alert-mgmt-rule-preview
branch
from
August 25, 2026 12:40
5435e21 to
510e0f9
Compare
Owner
Author
|
Moved to openshift/monitoring-plugin PR 1180. Branch rebased onto updated alert-mgmt-single-rule-endpoints (openshift openshift#1121). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Stacked on alert-mgmt-single-rule-endpoints (openshift#1121).
Adds:
POST /api/v1/alerting/rules/preview— dry-run create or updatewithout persisting changes
Preview shares planning logic with the execute paths (
plan_create_user_defined.go,plan_create_platform.go,plan_update.go) and returns a multi-resourcechange plan (
resources[],desiredRule,writable, optionalmanagedBy).Preview API
alertingRule+ optionalprometheusRuleruleId+ at least one oflabels,alertingRuleEnabled,or
classificationchanges[]and fulldesiredObjectforUI review
writable: falsewithmanagedBy)Tests
preview_alert_rule_test.go,both
pkg/managementandinternal/managementrouter)platform_update_parity_test.go)/rules/previewcreate and updateTest plan
go test ./pkg/management/... ./internal/managementrouter/...go build -tags e2e ./test/e2e/...Signed-off-by: Shirly Radco sradco@redhat.com
Co-authored-by: AI Assistant noreply@cursor.com
Made with Cursor