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

aws-cdk: Validation error for stackName #27746

Closed
alifrugal opened this issue Oct 30, 2023 · 4 comments
Closed

aws-cdk: Validation error for stackName #27746

alifrugal opened this issue Oct 30, 2023 · 4 comments
Labels
bug This issue is a bug. p1 package/tools Related to AWS CDK Tools or CLI

Comments

@alifrugal
Copy link

Describe the bug

Since @2.98, I have got a validation error on the names of the stacks when launching a cdk application with nested stacks.

Error occurred while monitoring stack: Error [ValidationError]: 2 validation errors detected: Value '' at 'stackName' failed to satisfy constraint: Member must have length greater than or equal to 1; Value '' at 'stackName' failed to satisfy constraint: Member must satisfy regular expression pattern: [a-zA-Z][-a-zA-Z0-9]*|arn:[-a-zA-Z0-9:/._+]* at Request.extractError (/usr/local/lib/node_modules/aws-cdk/lib/index.js:362:46430) at Request.callListeners (/usr/local/lib/node_modules/aws-cdk/lib/index.js:362:90083) at Request.emit (/usr/local/lib/node_modules/aws-cdk/lib/index.js:362:89531) at Request.emit (/usr/local/lib/node_modules/aws-cdk/lib/index.js:362:196289) at Request.transition (/usr/local/lib/node_modules/aws-cdk/lib/index.js:362:189841) at AcceptorStateMachine.runTo (/usr/local/lib/node_modules/aws-cdk/lib/index.js:362:154713) at /usr/local/lib/node_modules/aws-cdk/lib/index.js:362:155043 at Request.<anonymous> (/usr/local/lib/node_modules/aws-cdk/lib/index.js:362:190133) at Request.<anonymous> (/usr/local/lib/node_modules/aws-cdk/lib/index.js:362:196364) at Request.callListeners (/usr/local/lib/node_modules/aws-cdk/lib/index.js:362:90251) { code: 'ValidationError', time: 2023-10-30T06:44:13.579Z, requestId: '70dbfc8a-0639-4aa7-aa14-014fe1ec811a', statusCode: 400,

Expected Behavior

If I downgrade CDK (installed globally) to @2.96, I don't have the issue.

Current Behavior

Error occurred while monitoring stack: Error [ValidationError]: 2 validation errors detected: Value '' at 'stackName' failed to satisfy constraint: Member must have length greater than or equal to 1; Value '' at 'stackName' failed to satisfy constraint: Member must satisfy regular expression pattern: [a-zA-Z][-a-zA-Z0-9]*|arn:[-a-zA-Z0-9:/._+]* at Request.extractError (/usr/local/lib/node_modules/aws-cdk/lib/index.js:362:46430) at Request.callListeners (/usr/local/lib/node_modules/aws-cdk/lib/index.js:362:90083) at Request.emit (/usr/local/lib/node_modules/aws-cdk/lib/index.js:362:89531) at Request.emit (/usr/local/lib/node_modules/aws-cdk/lib/index.js:362:196289) at Request.transition (/usr/local/lib/node_modules/aws-cdk/lib/index.js:362:189841) at AcceptorStateMachine.runTo (/usr/local/lib/node_modules/aws-cdk/lib/index.js:362:154713) at /usr/local/lib/node_modules/aws-cdk/lib/index.js:362:155043 at Request.<anonymous> (/usr/local/lib/node_modules/aws-cdk/lib/index.js:362:190133) at Request.<anonymous> (/usr/local/lib/node_modules/aws-cdk/lib/index.js:362:196364) at Request.callListeners (/usr/local/lib/node_modules/aws-cdk/lib/index.js:362:90251) { code: 'ValidationError', time: 2023-10-30T06:44:13.579Z, requestId: '70dbfc8a-0639-4aa7-aa14-014fe1ec811a', statusCode: 400,

Reproduction Steps

Launch a stack with nested stacks

Possible Solution

No response

Additional Information/Context

No response

CDK CLI Version

2.103.1

Framework Version

No response

Node.js Version

20.9.0

OS

MacOS 13.6

Language

TypeScript

Language Version

No response

Other information

No response

@alifrugal alifrugal added bug This issue is a bug. needs-triage This issue or PR still needs to be triaged. labels Oct 30, 2023
@github-actions github-actions bot added the package/tools Related to AWS CDK Tools or CLI label Oct 30, 2023
@suhussai
Copy link

I believe this issue is related: #27526

@khushail khushail added investigating This issue is being investigated and/or work is in progress to resolve the issue. and removed needs-triage This issue or PR still needs to be triaged. labels Oct 31, 2023
@rix0rrr rix0rrr added the p1 label Nov 16, 2023
@rix0rrr
Copy link
Contributor

rix0rrr commented Nov 16, 2023

This was probably fixed in #27692 (released as 2.104.0)

@khushail khushail removed the investigating This issue is being investigated and/or work is in progress to resolve the issue. label Nov 22, 2023
@alifrugal
Copy link
Author

Fixed in 2.104.0

Copy link

⚠️COMMENT VISIBILITY WARNING⚠️

Comments on closed issues are hard for our team to see.
If you need more assistance, please either tag a team member or open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue is a bug. p1 package/tools Related to AWS CDK Tools or CLI
Projects
None yet
Development

No branches or pull requests

4 participants