steinwaywhw commented on code in PR #40814:
URL: https://github.com/apache/airflow/pull/40814#discussion_r2134339665
##########
airflow/providers/cncf/kubernetes/operators/job.py:
##########
@@ -159,34 +166,59 @@ def execute(self, context: Context):
ti.xcom_push(key="job_name", value=self.job.metadata.name)
ti.xcom_push(key="job_namespace", value=self.job.metadata.namespace)
+ if self.pod is None:
+ self.pod = self.get_or_create_pod( # must set `self.pod` for
`on_kill`
+ pod_request_obj=self.pod_request_obj,
+ context=context,
+ )
Review Comment:
I have the same question. I thought the K8s Job will manage the pod
creations, why would we need creating the pod manually again? I'm actually
running into bugs where I set parallelism to more than 1 and this line triggers
self.find_pods() which triggers
https://github.com/apache/airflow/blob/56fbe90a8d0b56558c02d75f4ac5852e041cb058/providers/cncf/kubernetes/src/airflow/providers/cncf/kubernetes/operators/pod.py#L563
--
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]