(glue-alpha): cannot add multiple partition indexes to table #27045
Labels
@aws-cdk/aws-glue
Related to AWS Glue
bug
This issue is a bug.
effort/medium
Medium work item – several days of effort
p2
Describe the bug
Adding a partition index to a glue table requires a custom resource. This custom resource calls
glue.createPartitionIndex
api, of which there is a requirement that only one partition index is inCREATING
state at a time.So adding multiple partition indexes gets the following deploy-time error:
Expected Behavior
Multiple partition indexes should be allowed. We should wait until one partition index has landed before starting the next.
Current Behavior
Deploy-time error.
Reproduction Steps
The integ test that we currently have demonstrates this issue:
https://github.com/kaizencc/aws-cdk/blob/main/packages/@aws-cdk/aws-glue-alpha/test/integ.partition-index.ts
Possible Solution
We need to rewrite the custom resource. Currently we use
AwsCustomResource
, which supports only one sdk call per resource. We need to introduce a second API callglue.getPartitionIndex
that returns a status, and continue to ping that api until the status returnsCREATED
Additional Information/Context
No response
CDK CLI Version
2.93.0
Framework Version
2.93.0
Node.js Version
Node 18
OS
Mac
Language
Typescript
Language Version
No response
Other information
No response
The text was updated successfully, but these errors were encountered: