karenbraganz commented on code in PR #68048:
URL: https://github.com/apache/airflow/pull/68048#discussion_r3857220465


##########
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:
   I have run manual tests and also added tests in the code.



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