ramitkataria commented on code in PR #76848:
URL: https://github.com/apache/airflow/pull/76848#discussion_r4607758242
##########
providers/amazon/src/airflow/providers/amazon/aws/sensors/bedrock.py:
##########
@@ -83,6 +85,12 @@ def poke(self, context: Context, **kwargs) -> bool:
return state not in self.INTERMEDIATE_STATES
+ def execute_complete(self, context: Context, event: dict[str, Any] | None
= None) -> None:
Review Comment:
Thanks, that was worth checking. Here's a comparison of every status the API
can return against the waiter each trigger uses, for all ten sensors:
- Exact match: customize model, provisioned throughput, Comprehend document
classifier, and both Kinesis Analytics sensors.
- Batch inference (`scheduled` and `completed`): matches except for
`Stopping`. The waiter fails there, while `poke()` waits for `Stopped` and then
fails. Same result, one state later.
- A few states pass `poke()` but not the waiter: `SUBMITTED` (Comprehend
PII), `STOPPING`/`STOPPED` (ingestion job),
`DELETE_UNSUCCESSFUL`/`UPDATE_UNSUCCESSFUL` (knowledge base),
`UPDATING`/`UPDATE_FAILED` (OpenSearch Serverless).
The waiter is never the more lenient of the two, so resuming on its result
can't pass a sensor early. That last group is an existing gap in non-deferrable
mode, so I'll fix it in a follow-up to keep this PR focused.
--
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]