ephraimbuddy commented on a change in pull request #15336:
URL: https://github.com/apache/airflow/pull/15336#discussion_r612316998
##########
File path: airflow/executors/kubernetes_executor.py
##########
@@ -187,25 +190,35 @@ def process_status(
self,
pod_id: str,
namespace: str,
- status: str,
+ status: V1PodStatus,
annotations: Dict[str, str],
resource_version: str,
event: Any,
) -> None:
"""Process status response"""
- if status == 'Pending':
- if event['type'] == 'DELETED':
+ pod_status = status.phase
+ if pod_status == 'Pending':
+ # Check container statuses
+ container_statuses = status.container_statuses
+ init_container_statuses = status.init_container_statuses
+ if container_statuses and
self._container_image_pull_err(container_statuses):
+ self.log.info('Event: Failed to start pod %s, a container has
an ErrImagePull', pod_id)
+ self.watcher_queue.put((pod_id, namespace, State.FAILED,
annotations, resource_version))
Review comment:
While this marks the tasks as failed, the pod remains in 'Pending' state
and thus not deleted. Looking for a way to change the Pod status
--
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.
For queries about this service, please contact Infrastructure at:
[email protected]