NilsIrl commented on code in PR #40814:
URL: https://github.com/apache/airflow/pull/40814#discussion_r1828343415


##########
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:
   Doesn't this defeat the point of using a job if a pod is created anyway? 
Also doesn't this mean 2 pods are now created (1 from the job and this pod 
that's also manually created)?



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