PrefectAmazon ECS

Runner AttributeError prevents cleanup after successful flow completion

warning
availabilityUpdated May 14, 2025(via Exa)
How to detect:

After successful flow completion, FlowRunCancellingObserver fails during event consumption when attempting to access _runs_task_group attribute that doesn't exist on Runner object. Flow completes successfully and UI shows success, but post-flow cleanup operations fail silently in ECS task logs.

Recommended action:

Apply fix from PR #20127 or revert commits 378fc4f6b7 and 6869a02a04. Monitor ECS task logs for 'ERROR | prefect.FlowRunCancellingObserver - Error consuming events' even when UI shows flow success, as cleanup failures may accumulate resources or leave inconsistent state.