henry3260 commented on code in PR #76393:
URL: https://github.com/apache/airflow/pull/76393#discussion_r4505857542


##########
providers/cncf/kubernetes/src/airflow/providers/cncf/kubernetes/utils/pod_manager.py:
##########
@@ -254,30 +254,31 @@ def detect_pod_terminate_early_issues(pod: V1Pod) -> str 
| None:
 
     FATAL_STATES = ["InvalidImageName", "ErrImageNeverPull"]
     TRANSIENT_STATES = ["ErrImagePull", "ImagePullBackOff"]
-    ERROR_MESSAGE = "Image cannot be pulled, unable to start: 
{reason}\n{message}"
+    ERROR_MESSAGE = "Image for container '{name}' cannot be pulled, unable to 
start: {reason}\n{message}"
 
     pod_status = pod.status
-    if not pod_status.container_statuses:
-        return None
-
-    for container_status in pod_status.container_statuses:
+    # Init containers first: while one of them is stuck pulling, the main
+    # container only reports ``PodInitializing``, which matches no state below.
+    container_statuses = [
+        *(pod_status.init_container_statuses or []),

Review Comment:
   yeah, we should skip `initialize == true` case



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