uranusjr commented on code in PR #68048:
URL: https://github.com/apache/airflow/pull/68048#discussion_r3744769948
##########
providers/apache/spark/src/airflow/providers/apache/spark/hooks/spark_submit.py:
##########
@@ -1195,7 +1197,38 @@ def _poll_k8s_driver_via_api(self) -> str | None:
) from e
time.sleep(poll_interval)
continue
-
+ driver_container = None
+
+ for container in pod.spec.containers:
+ if "spark" in container.name.lower() or "driver" in
container.name.lower():
+ driver_container = container
+ break
+ if len(pod.spec.containers) == 1:
+ driver_container = container
Review Comment:
Say with a pod whose containers are `[spark-metrics-exporter,
spark-kubernetes-driver]`, where the exporter has terminated 0 and the driver
is still Running. The loop matches the exporter, sets
`container_completed=True`, and returns Succeeded. The task is now terminal,
but the Spark application is still executing. The lookup loop needs more work.
--
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]