aurangzaib048 commented on code in PR #64770:
URL: https://github.com/apache/airflow/pull/64770#discussion_r3074881021


##########
providers/amazon/src/airflow/providers/amazon/aws/operators/emr.py:
##########
@@ -604,10 +610,19 @@ def check_failure(self, query_status):
     def execute_complete(self, context: Context, event: dict[str, Any] | None 
= None) -> str:
         validated_event = validate_execute_complete_event(event)
 
-        if validated_event["status"] != "success":
-            raise AirflowException(f"Error while running job: 
{validated_event}")
-
-        return validated_event["job_id"]
+        if validated_event["status"] == "success":
+            return validated_event["job_id"]
+        job_id = validated_event.get("job_id") or self.job_id

Review Comment:
   Fixed. Now using only `validated_event.get("job_id")` — dropped the 
`self.job_id` fallback since the worker may be different after deferral.



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