Lee-W commented on code in PR #34966:
URL: https://github.com/apache/airflow/pull/34966#discussion_r1363088819


##########
airflow/providers/amazon/aws/operators/eks.py:
##########
@@ -397,10 +397,10 @@ def deferrable_create_cluster_next(self, context: 
Context, event: dict[str, Any]
                 )
 
     def execute_failed(self, context: Context, event: dict[str, Any] | None = 
None) -> None:
-        if event is None:
-            self.log.info("Trigger error: event is None")
-            raise AirflowException("Trigger error: event is None")
-        elif event["status"] == "delteted":
+        if event is None or event["status"] != "deleted":
+            self.log.info("Trigger error: event is %s", event)
+            raise AirflowException(f"Trigger error: event is {event}")
+        else:
             self.log.info("Cluster deleted")
             raise event["exception"]

Review Comment:
   What about raise an AirflowExcpetion instead?
   ```suggestion
           self.log.info("Cluster deleted")
           raise AirflowException(event)
   ```



-- 
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: commits-unsubscr...@airflow.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to