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: CfnDatabase can't update if name is not provided #31158

Open
1 task
grzegorzewald opened this issue Aug 20, 2024 · 3 comments
Open
1 task

glue: CfnDatabase can't update if name is not provided #31158

grzegorzewald opened this issue Aug 20, 2024 · 3 comments
Labels
@aws-cdk/aws-glue Related to AWS Glue bug This issue is a bug. needs-cfn This issue is waiting on changes to CloudFormation before it can be addressed. p2

Comments

@grzegorzewald
Copy link

Describe the bug

When once Cretes instance of CfnDatabase without name property set, it has name generated automatically based on construct ID. This is expected behaviour. But when construct is updated, CloudFormation errors with "no name provided error"

Regression Issue

  • Select this option if this issue appears to be a regression.

Last Known Working CDK Version

2.152

Expected Behavior

When CfnDatabase is updated without name property set up, it would use previously generated database name

Current Behavior

When CfnDatabase is updated without name property set up it errors with:
Database name cannot be equal to null or empty (Service: AWSGlue; Status Code: 400; Error Code: InvalidInputException; Request ID:00000000-0000-4000-0000-000000000000; Proxy: null)

Reproduction Steps

Create Database construct:

    const glueDatabase = new CfnDatabase(this, "MyDatabase", {
      catalogId: this.account,
      databaseInput: {
        description: "My Database",
      },
    });

deploy, update code to:

    const glueDatabase = new CfnDatabase(this, "MyDatabase", {
      catalogId: this.account,
      databaseInput: {
        description: "My Database",
        locationUri: `s3://${bucket.bucketName}/path/`,
      },
    });

and deploy once again

Possible Solution

No response

Additional Information/Context

No response

CDK CLI Version

2.152.0 (build faa7d79)

Framework Version

No response

Node.js Version

v18.12.1

OS

MacOs 14.6

Language

TypeScript

Language Version

No response

Other information

No response

@grzegorzewald grzegorzewald added bug This issue is a bug. needs-triage This issue or PR still needs to be triaged. labels Aug 20, 2024
@github-actions github-actions bot added the @aws-cdk/custom-resources Related to AWS CDK Custom Resources label Aug 20, 2024
@pahud pahud self-assigned this Aug 20, 2024
@pahud
Copy link
Contributor

pahud commented Aug 20, 2024

This seems to be a CFN bug to me as the Name is not required.

I will report to the internal team for verifying.

@grzegorzewald
Copy link
Author

Exactly @pahud, name is not required, but feels to be required on update for reason...

@pahud
Copy link
Contributor

pahud commented Aug 20, 2024

internal tracking: V1491264517

@pahud pahud added p2 needs-cfn This issue is waiting on changes to CloudFormation before it can be addressed. labels Aug 20, 2024
@pahud pahud removed their assignment Aug 20, 2024
@pahud pahud added @aws-cdk/aws-glue Related to AWS Glue and removed needs-triage This issue or PR still needs to be triaged. @aws-cdk/custom-resources Related to AWS CDK Custom Resources labels Aug 20, 2024
@pahud pahud changed the title aws-glue/CfnDatabase: Issue with updates if name is not provided glue: CfnDatabase can't update if name is not provided Aug 20, 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. needs-cfn This issue is waiting on changes to CloudFormation before it can be addressed. p2
Projects
None yet
Development

No branches or pull requests

2 participants