ucaeon commented on code in PR #73591:
URL: https://github.com/apache/airflow/pull/73591#discussion_r4310748717


##########
dev/breeze/src/airflow_breeze/commands/kubernetes_kustomize_commands.py:
##########
@@ -279,6 +280,61 @@ def _wait_for_verify_resource(
     return 1
 
 
+def _get_pod_health_problems(pods: list[dict[str, Any]]) -> list[str]:
+    problems = []
+    for pod in pods:
+        name = pod["metadata"]["name"]
+        status = pod.get("status", {})
+        phase = status.get("phase", "Unknown")
+        if pod["metadata"].get("deletionTimestamp"):
+            problems.append(f"{name}: terminating")
+        elif phase == "Succeeded":
+            continue
+        elif phase != "Running":
+            problems.append(f"{name}: {phase}")
+        elif not any(
+            condition["type"] == "Ready" and condition["status"] == "True"
+            for condition in status.get("conditions", [])
+        ):
+            problems.append(f"{name}: not Ready")
+    return problems
+
+
+def _wait_for_airflow_pods(
+    namespace: str, release_name: str, timeout_seconds: int, env: dict[str, 
str]
+) -> int:
+    """Wait for the Helm release's pods to be Running/Ready or successfully 
completed."""
+    kubectl = str(KUBECTL_BIN_PATH)
+    scope = ["-n", namespace, "-l", f"release={release_name}"]

Review Comment:
   I kept the release-wide scope to check that the environment remains healthy 
and documented this limitation as you suggested.
   
   The docs now explain that existing problems can block promotion and that a 
failed check does not establish that the overlay caused the problem. The Helm 
docs build passed. Thanks for raising this!☺️



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