Crowiant commented on code in PR #49899:
URL: https://github.com/apache/airflow/pull/49899#discussion_r2208167070


##########
providers/cncf/kubernetes/src/airflow/providers/cncf/kubernetes/operators/job.py:
##########
@@ -168,34 +176,43 @@ def execute(self, context: Context):
         ti.xcom_push(key="job_namespace", value=self.job.metadata.namespace)
 
         self.pod: k8s.V1Pod | None
-        if self.pod is None:
-            self.pod = self.get_or_create_pod(  # must set `self.pod` for 
`on_kill`
+        self.pods: Sequence[k8s.V1Pod] | None = None
+        if self.parallelism is None and self.pod is None:
+            self.pod = self.get_or_create_pod(
                 pod_request_obj=self.pod_request_obj,
                 context=context,
             )
+            self.pods = [
+                self.pod,
+            ]

Review Comment:
   Thank you for your advice! Done.



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