dirrao commented on code in PR #38998:
URL: https://github.com/apache/airflow/pull/38998#discussion_r1564401980


##########
airflow/providers/amazon/aws/hooks/batch_client.py:
##########
@@ -414,22 +418,20 @@ def get_job_description(self, job_id: str) -> dict:
             )
 
     @staticmethod
-    def parse_job_description(job_id: str, response: dict) -> dict:
+    def parse_job_description(job_id: str, response: dict) -> dict | None:
         """
         Parse job description to extract description for job_id.
 
         :param job_id: a Batch job ID
 
         :param response: an API response for describe jobs
 
-        :return: an API response to describe job_id
-
-        :raises: AirflowException
+        :return: an API response to describe job_id or None if job_id not 
found in response
         """
         jobs = response.get("jobs", [])
         matching_jobs = [job for job in jobs if job.get("jobId") == job_id]
         if len(matching_jobs) != 1:
-            raise AirflowException(f"AWS Batch job ({job_id}) description 
error: response: {response}")

Review Comment:
   how are we handling the case where the job id itself doesn't exist at all. 
are we failing the job?



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