passionworkeer commented on issue #58968:
URL: https://github.com/apache/airflow/issues/58968#issuecomment-4050253130

   A practical implementation path is to mirror the KubernetesExecutor orphan 
cleanup pattern, but key the scan on KPO labels and compare against active 
non-terminal TIs in one batched query. Two details worth handling early: 
normalize dag_id/task_id/run_id/map_index with the same label-safe transform 
used on pod creation, and treat pod.try_number < ti.try_number as stale even if 
the TI still exists. I’d also make the cleanup feature-flagged first and add 
tests for both unmapped and mapped KPO pods, since map_index mismatches are an 
easy place for false positives.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to