jedcunningham commented on code in PR #30375:
URL: https://github.com/apache/airflow/pull/30375#discussion_r1166100533
##########
airflow/executors/kubernetes_executor.py:
##########
@@ -865,6 +826,41 @@ def try_adopt_task_instances(self, tis:
Sequence[TaskInstance]) -> Sequence[Task
tis_to_flush.extend(pod_ids.values())
return tis_to_flush
+ def cleanup_stuck_queued_tasks(self, tis: list[TaskInstance]) -> list[str]:
+ """
+ Handle remnants of tasks that were failed because they were stuck in
queued.
+ Tasks can get stuck in queued. If such a task is detected, it will be
marked
+ as `UP_FOR_RETRY` if the task instance has remaining retries or marked
as `FAILED`
+ if it doesn't.
+
+ :param tis: List of Task Instances to clean up
+ :return: List of readable task instances for a warning message
+ """
Review Comment:
```suggestion
"""
if TYPE_CHECKING:
assert self.kube_client
assert self.kube_scheduler
```
This should fix mypy.
--
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]