Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(glue-alpha): cannot add multiple partition indexes to table #27045

Open
kaizencc opened this issue Sep 7, 2023 · 0 comments
Open

(glue-alpha): cannot add multiple partition indexes to table #27045

kaizencc opened this issue Sep 7, 2023 · 0 comments
Assignees
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

Comments

@kaizencc
Copy link
Contributor

kaizencc commented Sep 7, 2023

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 in CREATING state at a time.

So adding multiple partition indexes gets the following deploy-time error:

Received response status [FAILED] from custom resource. Message returned: Index index2 is in CREATING state. Only 1 index can be created or deleted simultaneously per table.

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 call glue.getPartitionIndex that returns a status, and continue to ping that api until the status returns CREATED

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

@kaizencc kaizencc added bug This issue is a bug. needs-triage This issue or PR still needs to be triaged. labels Sep 7, 2023
@github-actions github-actions bot added the @aws-cdk/aws-glue Related to AWS Glue label Sep 7, 2023
@kaizencc kaizencc added p2 effort/medium Medium work item – several days of effort @aws-cdk/aws-glue Related to AWS Glue and removed @aws-cdk/aws-glue Related to AWS Glue needs-triage This issue or PR still needs to be triaged. labels Sep 7, 2023
@colifran colifran self-assigned this May 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants