kesem0811 commented on code in PR #52051:
URL: https://github.com/apache/airflow/pull/52051#discussion_r2173856282
##########
providers/cncf/kubernetes/src/airflow/providers/cncf/kubernetes/operators/spark_kubernetes.py:
##########
@@ -293,10 +293,24 @@ def client(self) -> CoreV1Api:
def custom_obj_api(self) -> CustomObjectsApi:
return CustomObjectsApi()
+ def update_pod_spec_add_xcom_sidecar(self):
+ if self.do_xcom_push:
+ try:
+ self.log.debug("Adding xcom sidecar to driver pod spec in task
%s", self.task_id)
+ driver_template = self.template_body["spark"]["spec"]
+ driver_with_xcom_template =
add_sidecar_to_spark_operator_pod_spec(
+ driver_template,
+
sidecar_container_image=self.hook.get_xcom_sidecar_container_image(),
+
sidecar_container_resources=self.hook.get_xcom_sidecar_container_resources(),
+ )
+ self.template_body["spark"]["spec"]= driver_with_xcom_template
+ except KeyError as e:
+ raise AirflowException("Spec missing in SparkApplication
template") from e
Review Comment:
Why?
In all the file, when something doesn't work as expected, an
AirflowException is raised
--
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]