romsharon98 commented on code in PR #41220:
URL: https://github.com/apache/airflow/pull/41220#discussion_r1706741949


##########
airflow/providers/cncf/kubernetes/executors/kubernetes_executor.py:
##########
@@ -601,34 +601,31 @@ def cleanup_stuck_queued_tasks(self, tis: 
list[TaskInstance]) -> list[str]:
         :param tis: List of Task Instances to clean up
         :return: List of readable task instances for a warning message
         """
-        from airflow.providers.cncf.kubernetes.pod_generator import 
PodGenerator
-
         if TYPE_CHECKING:
             assert self.kube_client
             assert self.kube_scheduler
-        readable_tis = []
+        readable_tis: list[str] = []
+        if not tis:
+            return readable_tis
+        pod_labels_combined_str_to_pod_map = 
self.get_pod_labels_combined_str_to_pod_map()
         for ti in tis:
-            selector = PodGenerator.build_selector_for_k8s_executor_pod(
-                dag_id=ti.dag_id,
-                task_id=ti.task_id,
-                try_number=ti.try_number,

Review Comment:
   Based on my observations, the `run_id` remains the same across retries, even 
though the `try_number` changes.
   
   



-- 
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