ferruzzi commented on code in PR #30501:
URL: https://github.com/apache/airflow/pull/30501#discussion_r1176782881
##########
airflow/providers/amazon/aws/waiters/dynamodb.json:
##########
@@ -0,0 +1,30 @@
+{
+ "version": 2,
+ "waiters": {
+ "export_table": {
+ "operation": "DescribeExport",
+ "delay": 30,
+ "maxAttempts": 60,
+ "acceptors": [
+ {
+ "matcher": "path",
+ "expected": "COMPLETED",
+ "argument": "ExportDescription.ExportStatus",
Review Comment:
I was mistaken on the lowercase suggestion. Looking through a handful of
other examples of official waiters in the botocore package, (see
[EC2](https://github.com/boto/botocore/blob/develop/botocore/data/ec2/2016-11-15/waiters-2.json#L81)
for example) they all seem to match the case exactly as the [boto API
docs](https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/dynamodb/client/describe_export.html)
have it,, so in this instance PascalCase would be the right answer. Sorry
about that.
I have one last idea if you are willing to try it out, but I won't block the
PR longer for this.
I think the root issue is that the DynamoDB hook is creating a
`resource_type` instead of a `client_type` and, as the erro message says, the
ServiceResource doesn't have a method called `describe_export`. But the
BaseAwsHook `get_waiter` method accepts a client as a parameter, so we could
try that. Something like:
```
waiter = self.hook.get_waiter(waiter_name=CUSTOM_WAITER_NAME,
client=boto3.client('dynamodb'))
waiter.wait(ExportArn=response.get("ExportArn"))
```
If that doesn't work, then I'm willing to concede this one and we can do a
polling loop here until I et time to look deeper into why this one won't
cooperate.
--
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]