ramitkataria commented on code in PR #76848:
URL: https://github.com/apache/airflow/pull/76848#discussion_r4607765369
##########
providers/amazon/src/airflow/providers/amazon/aws/sensors/comprehend.py:
##########
@@ -227,11 +235,23 @@ def execute(self, context: Context) -> Any:
verify=self.verify,
botocore_config=self.botocore_config,
),
- method_name="poke",
+ method_name="execute_complete",
)
else:
super().execute(context=context)
+ def execute_complete(self, context: Context, event: dict[str, Any] | None
= None) -> None:
+ validated_event = validate_execute_complete_event(event)
+
+ if validated_event["status"] != "success":
Review Comment:
I think this one is fine as is. The check is on the trigger event, not the
classifier status, and the trigger only ever sends `success` or `error`.
The classifier's own states are sorted out by the waiter before that.
`TRAINED_WITH_WARNING` counts as success there, and the
`validate_document_classifier_training_status` call right below fails it when
`fail_on_warnings` is set.
Happy to change it if you had a specific case in mind that this misses.
--
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]