o-nikolas commented on code in PR #76646:
URL: https://github.com/apache/airflow/pull/76646#discussion_r4556196419
##########
providers/amazon/src/airflow/providers/amazon/aws/operators/bedrock.py:
##########
@@ -1547,8 +1574,18 @@ def execute(self, context: Context) -> str:
}
)
response = self.hook.conn.create_guardrail_version(**kwargs)
+ guardrail_id = response["guardrailId"]
version = response["version"]
- self.log.info("Guardrail %s version %s created.",
response["guardrailId"], version)
+ self.log.info("Guardrail %s version %s created.", guardrail_id,
version)
+
+ if self.wait_for_completion:
+ self.log.info("Waiting for guardrail %s to be ready.",
guardrail_id)
+ self.hook.get_waiter("guardrail_ready").wait(
+ guardrailIdentifier=guardrail_id,
+ guardrailVersion="DRAFT",
+ WaiterConfig={"Delay": self.waiter_delay, "MaxAttempts":
self.waiter_max_attempts},
Review Comment:
Thanks for running the DRAFT vs numbered version check!
--
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]