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


##########
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:
   nit. I guess this is more a question of style and personal opinion but do 
not you think it would be clearer/easier to read if you use `@tenacity`?



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