vincbeck commented on code in PR #55445:
URL: https://github.com/apache/airflow/pull/55445#discussion_r2337357279


##########
providers/amazon/src/airflow/providers/amazon/aws/operators/bedrock.py:
##########
@@ -654,9 +656,37 @@ def execute_complete(self, context: Context, event: 
dict[str, Any] | None = None
         return validated_event["ingestion_job_id"]
 
     def execute(self, context: Context) -> str:
-        ingestion_job_id = self.hook.conn.start_ingestion_job(
-            knowledgeBaseId=self.knowledge_base_id, 
dataSourceId=self.data_source_id
-        )["ingestionJob"]["ingestionJobId"]
+        def start_ingestion_job():
+            try:
+                ingestion_job_id = self.hook.conn.start_ingestion_job(
+                    knowledgeBaseId=self.knowledge_base_id, 
dataSourceId=self.data_source_id
+                )["ingestionJob"]["ingestionJobId"]
+
+                return ingestion_job_id
+            except ClientError as error:
+                error_message = error.response["Error"]["Message"].lower()
+                is_known_retryable_message = (

Review Comment:
   I think I would personally prefer tenacity but I will not block the PR 
because of that



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