kaxil commented on code in PR #28230:
URL: https://github.com/apache/airflow/pull/28230#discussion_r1054839109


##########
airflow/providers/cncf/kubernetes/operators/kubernetes_pod.py:
##########
@@ -509,48 +527,141 @@ def execute(self, context: Context):
             if self.do_xcom_push:
                 
self.pod_manager.await_xcom_sidecar_container_start(pod=self.pod)
                 result = self.extract_xcom(pod=self.pod)
-            remote_pod = self.pod_manager.await_pod_completion(self.pod)
+            self.remote_pod = self.pod_manager.await_pod_completion(self.pod)
         finally:
             self.cleanup(
                 pod=self.pod or self.pod_request_obj,
-                remote_pod=remote_pod,
+                remote_pod=self.remote_pod,
             )
         ti = context["ti"]
         ti.xcom_push(key="pod_name", value=self.pod.metadata.name)
         ti.xcom_push(key="pod_namespace", value=self.pod.metadata.namespace)
         if self.do_xcom_push:
             return result
 
-    def _read_pod_log_events(self, pod, *, reraise=True):
-        """Will fetch and emit events from pod"""
-        with _optionally_suppress(reraise=reraise):
-            for event in self.pod_manager.read_pod_events(pod).items:
-                self.log.error("Pod Event: %s - %s", event.reason, 
event.message)
+    def asynchronously(self, context: Context):

Review Comment:
   `execute_async` would be a better name. 



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