eladkal commented on a change in pull request #19579:
URL: https://github.com/apache/airflow/pull/19579#discussion_r751635453



##########
File path: airflow/providers/amazon/aws/hooks/emr_containers.py
##########
@@ -123,7 +123,9 @@ def get_job_failure_reason(self, job_id: str) -> 
Optional[str]:
                 virtualClusterId=self.virtual_cluster_id,
                 id=job_id,
             )
-            reason = response['jobRun']['failureReason']
+            failure_reason = response['jobRun']['failureReason']
+            state_details = response["jobRun"]["stateDetails"]
+            reason = f"{failure_reason} - {state_details}"

Review comment:
       Is it backward compatible?
   
   Should we also modify the test to include the `stateDetails`?
   
https://github.com/apache/airflow/blob/890bd4310e12a0a4fadfaec1f9b36d2aaae6119e/tests/providers/amazon/aws/operators/test_emr_containers.py#L94-L103
   
   




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