amoghrajesh commented on code in PR #68067:
URL: https://github.com/apache/airflow/pull/68067#discussion_r3393279379
##########
providers/apache/spark/src/airflow/providers/apache/spark/operators/spark_submit.py:
##########
@@ -397,8 +441,19 @@ def poll_until_complete(self, external_id: JsonValue,
context: Context) -> None:
self._hook._run_post_submit_commands()
return
if self._hook._is_kubernetes:
- # TODO: poll K8s pod phase until terminal
- raise NotImplementedError("K8s poll not yet implemented")
+ if external_id is not None:
+ _, pod_name = str(external_id).split(":", 1)
+ self._hook._kubernetes_driver_pod = pod_name
Review Comment:
Sure, extracted a `_parse_k8s_external_id` helper that splits, validates,
and returns `(namespace, pod_name)`. Both `get_job_status` and
`poll_until_complete` now use it."
##########
providers/apache/spark/src/airflow/providers/apache/spark/operators/spark_submit.py:
##########
@@ -397,8 +441,19 @@ def poll_until_complete(self, external_id: JsonValue,
context: Context) -> None:
self._hook._run_post_submit_commands()
return
if self._hook._is_kubernetes:
- # TODO: poll K8s pod phase until terminal
- raise NotImplementedError("K8s poll not yet implemented")
+ if external_id is not None:
+ _, pod_name = str(external_id).split(":", 1)
+ self._hook._kubernetes_driver_pod = pod_name
Review Comment:
Sure, extracted a `_parse_k8s_external_id` helper that splits, validates,
and returns `(namespace, pod_name)`. Both `get_job_status` and
`poll_until_complete` now use it
--
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]