Service cascade-delete: removing A should remove dependents #66
Labels
No labels
prio_critical
prio_low
type_bug
type_contact
type_issue
type_lead
type_question
type_story
type_task
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
lhumina_code/hero_proc#66
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Context
When a user deletes service A and other services declare
requires: [A], those dependents should be deleted too (most-dependent-first). Todayservice.deleteonly removes the named service; dependents linger with a danglingrequiresreference.Two tests already exist but are
#[ignore]d:tests/integration/tests/service_management.rs:522—test_remove_parent_stops_children_first—#[ignore = "cascade deletion of dependent services not yet implemented"]tests/integration/tests/service_management.rs:605—test_remove_with_dependency_chain— same reasonRepro (from the tests)
A. Parent + one child:
cascade-parent, thencascade-child(requires parent). Both reachrunning.service_delete({name: "cascade-parent"}).cascade-parentandcascade-childare gone (assert_not_exists).B. Chain A ← B ← C:
service_delete({name: "chain-rm-a"}).Acceptance
service.deletecascades: deletes services with a transitiverequireschain into the target before deleting the target.test_remove_complete_cleanup(single-service delete still works).service.deleteresult schema gains optionaldeleted_servicescount, mirroring thedeleted_runs/deleted_jobspattern from action-delete cascade in #56.Notes / scope
hero_proc_liband use it for both. Likely depends on the cascade-stop issue landing first.crates/hero_proc_server/openrpc.jsonchange foraction.deletein #56's PR — same approach here.Follow-up to #56.