pankajkoti commented on code in PR #37363:
URL: https://github.com/apache/airflow/pull/37363#discussion_r1489282291


##########
airflow/providers/cncf/kubernetes/operators/pod.py:
##########
@@ -678,117 +678,88 @@ def invoke_defer_method(self, last_log_time: DateTime | 
None = None):
             method_name="trigger_reentry",
         )
 
-    @staticmethod
-    def raise_for_trigger_status(event: dict[str, Any]) -> None:
-        """Raise exception if pod is not in expected state."""
-        if event["status"] == "error":
-            error_type = event["error_type"]
-            description = event["description"]
-            if error_type == "PodLaunchTimeoutException":
-                raise PodLaunchTimeoutException(description)
-            else:
-                raise AirflowException(description)
-
     def trigger_reentry(self, context: Context, event: dict[str, Any]) -> Any:
         """
         Point of re-entry from trigger.
 
-        If ``logging_interval`` is None, then at this point the pod should be 
done and we'll just fetch
+        If ``logging_interval`` is None, then at this point, the pod should be 
done, and we'll just fetch
         the logs and exit.
 
-        If ``logging_interval`` is not None, it could be that the pod is still 
running and we'll just
+        If ``logging_interval`` is not None, it could be that the pod is still 
running, and we'll just
         grab the latest logs and defer back to the trigger again.
         """
-        remote_pod = None
+        self.pod = None
+        self.log.info("dadadadad %s", event)

Review Comment:
   ```suggestion
   ```



##########
airflow/providers/cncf/kubernetes/operators/pod.py:
##########
@@ -678,117 +678,88 @@ def invoke_defer_method(self, last_log_time: DateTime | 
None = None):
             method_name="trigger_reentry",
         )
 
-    @staticmethod
-    def raise_for_trigger_status(event: dict[str, Any]) -> None:
-        """Raise exception if pod is not in expected state."""
-        if event["status"] == "error":
-            error_type = event["error_type"]
-            description = event["description"]
-            if error_type == "PodLaunchTimeoutException":
-                raise PodLaunchTimeoutException(description)
-            else:
-                raise AirflowException(description)
-
     def trigger_reentry(self, context: Context, event: dict[str, Any]) -> Any:
         """
         Point of re-entry from trigger.
 
-        If ``logging_interval`` is None, then at this point the pod should be 
done and we'll just fetch
+        If ``logging_interval`` is None, then at this point, the pod should be 
done, and we'll just fetch
         the logs and exit.
 
-        If ``logging_interval`` is not None, it could be that the pod is still 
running and we'll just
+        If ``logging_interval`` is not None, it could be that the pod is still 
running, and we'll just
         grab the latest logs and defer back to the trigger again.
         """
-        remote_pod = None
+        self.pod = None
+        self.log.info("dadadadad %s", event)

Review Comment:
   or we can improve the log message



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