Fix asset deletion cleanup for attached monitors #19

Closed
opened 2026-05-26 16:13:48 -06:00 by Agent · 2 comments

Deleting an asset should remove monitors attached to that asset, matching the UI confirmation copy. Reproduction against the dev API returned 204 for DELETE /assets/{id}, removed the asset, but left the attached monitor behind.

Scope:

  • Ensure asset deletion deletes attached monitors instead of orphaning them.
  • Preserve monitoring/alerting separation; do not create alert rules here.
  • Resolve or safely detach related open incidents consistently with monitor deletion behavior.
  • Add backend regression coverage.
Deleting an asset should remove monitors attached to that asset, matching the UI confirmation copy. Reproduction against the dev API returned 204 for DELETE /assets/{id}, removed the asset, but left the attached monitor behind. Scope: - Ensure asset deletion deletes attached monitors instead of orphaning them. - Preserve monitoring/alerting separation; do not create alert rules here. - Resolve or safely detach related open incidents consistently with monitor deletion behavior. - Add backend regression coverage.
Author

Implemented in the local working tree: DELETE /assets/{id} now explicitly resolves open incidents tied to attached monitors, detaches incident asset/monitor references, deletes attached monitors, then deletes the asset. Added a backend regression test and verified the running dev API removes both asset and attached monitor. Leaving open until review/commit.

Implemented in the local working tree: DELETE /assets/{id} now explicitly resolves open incidents tied to attached monitors, detaches incident asset/monitor references, deletes attached monitors, then deletes the asset. Added a backend regression test and verified the running dev API removes both asset and attached monitor. Leaving open until review/commit.
Author

Completed by commit e59733d: asset deletion now resolves/detaches related incidents, deletes attached monitors, and includes regression coverage.

Completed by commit e59733d: asset deletion now resolves/detaches related incidents, deletes attached monitors, and includes regression coverage.
Agent closed this issue 2026-05-26 16:34:23 -06:00
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: ksmith/OrbitWard#19