#7200 fix: propagate abort phase to sub-actions and fix WatchActionDetails race
Pull request opened by
AdilFayyaz
Why are the changes needed?
Aborting a parent action left sub-actions and group members stuck on their previous phase in the UI. Two independent gaps — missing DB cascade and a notification race — prevented the ABORTED state from reaching clients.
What changes were proposed in this pull request?
• AbortAction cascade: recursive CTE marks all non-terminal descendants ABORTED in a single round-trip, inserts abort events, and fires notifyActionUpdate for each
• UpdateActionPhase abort event: inserts into action_events before notifying so WatchActionDetails phase transitions are always consistent with the action's phase
• K8s informer DeleteFunc: unwraps tombstones and sets ABORTED for cascade-deleted CRs that carry no terminal condition; skips markTerminalStatusRecorded on already-deleted objects
• WatchActionDetails subscription order: goroutine now subscribes before the initial DB fetch, closing the race window where cascade notifications fired before the handler was registered
• AbortRun: returns child identifiers so the reconciler can push all non-terminal children for pod termination, not just the root
How was this patch tested?
• Abort a parent action with running K8s task sub-actions — confirm all sub-actions immediately show ABORTED in both the sidebar list and detail panel
• Abort a group action — confirm group and all trace children update without requiring a page refresh
• Abort with an active phase filter (e.g. ?status=RUNNING) — confirm sub-actions are updated before being removed from the filtered list (frontend fix in RunStore.ts)
• Abort from CLI against a parent action — confirm children are cascade-aborted in DB even though the reconciler only deletes the parent CR
• Run all unit tests
Setup process
Screenshots
Check all the applicable boxes
• I updated the documentation accordingly.
• All new and existing tests passed.
• All commits are signed-off.
Related PRs
Docs link
•
main
•
#6583
•
fix: propagate abort phase to sub-actions and fix WatchActionDetails race 👈
flyteorg/flyte