dirrao commented on code in PR #41220:
URL: https://github.com/apache/airflow/pull/41220#discussion_r1706886426
##########
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:
Yes. I believe one pod exists in the system with a pending state for the
same run_id. is it possible to have multiple pods with different try_numbers
simultaneously?
--
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]