hussein-awala commented on code in PR #39702:
URL: https://github.com/apache/airflow/pull/39702#discussion_r1605979210


##########
airflow/providers/cncf/kubernetes/operators/pod.py:
##########
@@ -597,13 +598,14 @@ def execute_sync(self, context: Context):
             ti.xcom_push(key="pod_name", value=self.pod.metadata.name)
             ti.xcom_push(key="pod_namespace", 
value=self.pod.metadata.namespace)
 
-            # get remote pod for use in cleanup methods
-            self.remote_pod = self.find_pod(self.pod.metadata.namespace, 
context=context)
             if self.callbacks:
                 self.callbacks.on_pod_creation(
                     pod=self.remote_pod, client=self.client, 
mode=ExecutionMode.SYNC
                 )
             self.await_pod_start(pod=self.pod)
+
+            # get remote pod for use in cleanup methods
+            self.remote_pod = self.find_pod(self.pod.metadata.namespace, 
context=context)

Review Comment:
   Why do you need to move this block? The value of `remote_pod` is used in the 
previous block



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