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

(cli): Stack undefined in cdk deploy output #31685

Open
1 task
meve opened this issue Oct 7, 2024 · 4 comments · May be fixed by #31687
Open
1 task

(cli): Stack undefined in cdk deploy output #31685

meve opened this issue Oct 7, 2024 · 4 comments · May be fixed by #31687
Labels
bug This issue is a bug. p2 package/tools Related to AWS CDK Tools or CLI

Comments

@meve
Copy link
Contributor

meve commented Oct 7, 2024

Describe the bug

Running cdk deploy using the cli seems to return 'Stack undefined' in some cases.

Regression Issue

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

Last Known Working CDK Version

v2.160.0

Expected Behavior

To either show:

Stack <stackName>

Or nothing.

Current Behavior

I receive output like this:

sc-pipeline/test/queues (queues)
Stack undefined
sc-pipeline/test/queues (queues): deploying... [2/12]

Reproduction Steps

Run

cdk deploy

.

Possible Solution

I included a PR. The cause I suppose is related to bcf9209#diff-c7b9751a4ca56b6ee26510c9f650f6d5328f5be39071c93165aadbc138496eddR130. To resolve this, I just copied the condition found on line 42 of the same file, as it checks if stackName is defined or not. The comment on the line above seems to be identical as well.

Additional Information/Context

No response

CDK CLI Version

2.161.1 (build 0a606c9)

Framework Version

No response

Node.js Version

v18.20.4

OS

macOS 14.6.1 (23G93)

Language

TypeScript

Language Version

No response

Other information

No response

@meve meve added bug This issue is a bug. needs-triage This issue or PR still needs to be triaged. labels Oct 7, 2024
@github-actions github-actions bot added the package/tools Related to AWS CDK Tools or CLI label Oct 7, 2024
@meve meve linked a pull request Oct 7, 2024 that will close this issue
1 task
@akhilesh-akza
Copy link

Experiencing same. When I use NestedStacks it also seems to randomly fail with a validation error on stackName and that stackName='' is being passed and shows regex. But last time I checked NestedStacks don't need a stackName?

@ashishdhingra
Copy link
Contributor

@meve / @akhilesh-akza Could you please test with 2.161.1 (build 0a606c9). There was a regression issue reported in #31654 and CDK team had rollbacked PR that caused that issue.

Thanks,
Ashish

@ashishdhingra ashishdhingra added p2 response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 7 days. and removed needs-triage This issue or PR still needs to be triaged. labels Oct 7, 2024
@meve
Copy link
Contributor Author

meve commented Oct 7, 2024

@ashishdhingra I'm pretty sure this issue is still present in v2.161.1. I think it can be solved by just fixing that condition; it is only hit in the deploy path if I see it correctly:

sc-pipeline-stack/test/dynamodb (dynamodb)
Stack undefined
sc-pipeline-stack/test/dynamodb (dynamodb): deploying... [1/12]
dynamodb: creating CloudFormation changeset...

Thank you,

Joost

@akhilesh-akza
Copy link

@meve / @akhilesh-akza Could you please test with 2.161.1 (build 0a606c9). There was a regression issue reported in #31654 and CDK team had rollbacked PR that caused that issue.

Thanks, Ashish

The specific issue I mentioned is fixed in latest version. It seems default initialised project has frozen version in package.json to 2.161.0 and for some reason it's both dependency and devDependencies.

✨  Synthesis time: 8.36s

Stack undefined

But this still exists. Nothing major but better to clean it up so as to not cause confusion that somewhere name is not being read.

@github-actions github-actions bot removed the response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 7 days. label Oct 11, 2024
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. p2 package/tools Related to AWS CDK Tools or CLI
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants