shivaam commented on code in PR #64085:
URL: https://github.com/apache/airflow/pull/64085#discussion_r2972440069
##########
providers/amazon/src/airflow/providers/amazon/aws/triggers/base.py:
##########
@@ -149,13 +150,17 @@ async def run(self) -> AsyncIterator[TriggerEvent]:
client=client,
config_overrides=self.waiter_config_overrides,
)
- await async_wait(
- waiter,
- self.waiter_delay,
- self.attempts,
- self.waiter_args,
- self.failure_message,
- self.status_message,
- self.status_queries,
- )
- yield TriggerEvent({"status": "success", self.return_key:
self.return_value})
+ try:
+ await async_wait(
+ waiter,
+ self.waiter_delay,
+ self.attempts,
+ self.waiter_args,
+ self.failure_message,
+ self.status_message,
+ self.status_queries,
+ )
+ except AirflowException as e:
+ yield TriggerEvent({"status": "error", "message": str(e),
self.return_key: self.return_value})
Review Comment:
@o-nikolas
Does the TriggerEvent(status="error") approach look right? If so, I'll
add commits to fix all 8 operators in this PR before we can merge.
--
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]