Skip to content

alert-mgmt-09: DELETE /rules (bulk)#8

Open
sradco wants to merge 1 commit intoalert-mgmt-08-create-rulefrom
alert-mgmt-09-bulk-delete
Open

alert-mgmt-09: DELETE /rules (bulk)#8
sradco wants to merge 1 commit intoalert-mgmt-08-create-rulefrom
alert-mgmt-09-bulk-delete

Conversation

@sradco
Copy link
Owner

@sradco sradco commented Feb 25, 2026

Alert Management API — Part 9/14: DELETE /rules (bulk)

Summary

  • DELETE /api/v1/alerting/rules bulk handler accepting ruleIds array, returning per-rule status codes
  • Management-layer DeleteUserDefinedAlertRuleById: resolves rule by ID, validates preconditions (GitOps/operator guards), removes from PrometheusRule or AlertingRule
  • Platform rule deletion: removes alert from AlertingRule groups, cleans up empty groups
  • User-defined rule deletion: removes rule from PrometheusRule spec, deletes resource if last rule
  • Shared DeleteUserDefinedAlertRulesResponse type (also used by single-rule delete in PR 14)
  • getOriginalPlatformRule stub for platform rule lookup (extended in PR 11)
  • Unit tests for bulk delete handler and management delete logic including edge cases

Dependencies

This PR is part of a stacked series. Please review in order.

  1. alert-mgmt-01: k8s foundation + health stub skeleton
    2–8. Pending — alert queries, relabel/health, management foundation, endpoints, create
  2. → This PR — DELETE /rules (bulk)
    10–14. Pending — classification, platform update, bulk update, docs/CI/e2e, single-rule API

@sradco sradco force-pushed the alert-mgmt-08-create-rule branch from a559f9d to 5198ecd Compare February 25, 2026 22:35
@sradco sradco force-pushed the alert-mgmt-09-bulk-delete branch from 92b6c8d to fe91290 Compare February 25, 2026 22:35
@sradco sradco force-pushed the alert-mgmt-08-create-rule branch from 5198ecd to 533cca9 Compare February 25, 2026 22:52
@sradco sradco force-pushed the alert-mgmt-09-bulk-delete branch from fe91290 to 6e311b5 Compare February 25, 2026 22:52
@sradco sradco force-pushed the alert-mgmt-08-create-rule branch from 533cca9 to 23598f2 Compare February 25, 2026 23:16
@sradco sradco force-pushed the alert-mgmt-09-bulk-delete branch from 6e311b5 to 8f12523 Compare February 25, 2026 23:17
@sradco sradco force-pushed the alert-mgmt-08-create-rule branch from 23598f2 to ca93ce9 Compare February 25, 2026 23:34
@sradco sradco force-pushed the alert-mgmt-09-bulk-delete branch from 8f12523 to 907100e Compare February 25, 2026 23:34
@sradco sradco force-pushed the alert-mgmt-08-create-rule branch from ca93ce9 to 8d91e4f Compare February 25, 2026 23:47
@sradco sradco force-pushed the alert-mgmt-09-bulk-delete branch from 907100e to d3cf52e Compare February 25, 2026 23:47
@sradco sradco force-pushed the alert-mgmt-08-create-rule branch from 8d91e4f to bf4503d Compare February 25, 2026 23:57
@sradco sradco force-pushed the alert-mgmt-09-bulk-delete branch from d3cf52e to b755e09 Compare February 25, 2026 23:57
@sradco sradco force-pushed the alert-mgmt-08-create-rule branch from bf4503d to 99acedd Compare February 26, 2026 14:41
@sradco sradco force-pushed the alert-mgmt-09-bulk-delete branch from b755e09 to f0d12c2 Compare February 26, 2026 14:42
@sradco sradco force-pushed the alert-mgmt-08-create-rule branch from 99acedd to f821d82 Compare February 26, 2026 14:47
@sradco sradco force-pushed the alert-mgmt-09-bulk-delete branch from f0d12c2 to ab71e87 Compare February 26, 2026 14:47
@sradco sradco force-pushed the alert-mgmt-08-create-rule branch from f821d82 to 7fd1c78 Compare February 27, 2026 11:44
@sradco sradco force-pushed the alert-mgmt-09-bulk-delete branch from ab71e87 to cafef17 Compare February 27, 2026 11:44
@sradco sradco force-pushed the alert-mgmt-08-create-rule branch from 7fd1c78 to 2751640 Compare February 27, 2026 11:57
@sradco sradco force-pushed the alert-mgmt-09-bulk-delete branch from cafef17 to 9c4db86 Compare February 27, 2026 11:57
@sradco sradco force-pushed the alert-mgmt-08-create-rule branch from 2751640 to dadc949 Compare February 27, 2026 11:59
@sradco sradco force-pushed the alert-mgmt-09-bulk-delete branch from 9c4db86 to 9fe1dda Compare February 27, 2026 11:59
@sradco sradco force-pushed the alert-mgmt-08-create-rule branch from dadc949 to 9d9b595 Compare February 27, 2026 12:10
@sradco sradco force-pushed the alert-mgmt-09-bulk-delete branch from 9fe1dda to 9e51c16 Compare February 27, 2026 12:10
@sradco sradco force-pushed the alert-mgmt-08-create-rule branch from 9d9b595 to 91b17fb Compare February 27, 2026 13:12
@sradco sradco force-pushed the alert-mgmt-09-bulk-delete branch 2 times, most recently from 48054c5 to c869ec5 Compare March 1, 2026 21:08
@sradco sradco force-pushed the alert-mgmt-08-create-rule branch from 91b17fb to 86283bf Compare March 2, 2026 09:26
@sradco sradco force-pushed the alert-mgmt-09-bulk-delete branch from c869ec5 to 6e5bba0 Compare March 2, 2026 09:26
Signed-off-by: Shirly Radco <sradco@redhat.com>
Signed-off-by: João Vilaça <jvilaca@redhat.com>
Signed-off-by: Aviv Litman <alitman@redhat.com>
Co-authored-by: AI Assistant <noreply@cursor.com>
@sradco sradco force-pushed the alert-mgmt-08-create-rule branch from 86283bf to 53b5625 Compare March 2, 2026 10:04
@sradco sradco force-pushed the alert-mgmt-09-bulk-delete branch from 6e5bba0 to 7fddfa9 Compare March 2, 2026 10:04
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.

1 participant