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

(cdk-cli): Difficult to track cdk deploy issues #26924

Open
gabriels1234 opened this issue Aug 29, 2023 · 5 comments
Open

(cdk-cli): Difficult to track cdk deploy issues #26924

gabriels1234 opened this issue Aug 29, 2023 · 5 comments
Labels
bug This issue is a bug. effort/medium Medium work item – several days of effort p1 package/tools Related to AWS CDK Tools or CLI

Comments

@gabriels1234
Copy link

Describe the bug

Hi, this is between a bug and an annoyance.

When running cdk deploy , any error (in red) will make the deployment to fail.

The error is key to finding a solution.

But the real error disappears (sometimes too quickly) so we need to be trained into:

  • See red, pless control-C to halt execution, copy error and do the research to fix it.

This need not to be this way.

Expected Behavior

The summary need to include all the errors.

Current Behavior

Dev/MyStack (Dev-MyStack) failed: Error: The stack named Dev-MyStack failed to deploy: UPDATE_ROLLBACK_COMPLETE
    at FullCloudFormationDeployment.monitorDeployment (/Users/user/.nvm/versions/node/v18.17.1/lib/node_modules/aws-cdk/lib/index.js:443:10236)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async Object.deployStack2 [as deployStack] (/Users/user/.nvm/versions/node/v18.17.1/lib/node_modules/aws-cdk/lib/index.js:446:153718)
    at async /Users/user/.nvm/versions/node/v18.17.1/lib/node_modules/aws-cdk/lib/index.js:446:137166

Reproduction Steps

(best way to reproduce would be to run into this yourself)
(one case: remove a resource that's needed by another stack)

Possible Solution

No response

Additional Information/Context

No response

CDK CLI Version

2.93.0 (build 724bd01)

Framework Version

No response

Node.js Version

v18.17.1

OS

Mac OS 13.4

Language

Python

Language Version

Python (3.11)

Other information

No response

@gabriels1234 gabriels1234 added bug This issue is a bug. needs-triage This issue or PR still needs to be triaged. labels Aug 29, 2023
@github-actions github-actions bot added the package/tools Related to AWS CDK Tools or CLI label Aug 29, 2023
@peterwoodworth peterwoodworth added p2 effort/medium Medium work item – several days of effort and removed needs-triage This issue or PR still needs to be triaged. labels Aug 29, 2023
@peterwoodworth
Copy link
Contributor

I think I know what you're describing - to see the errors you should be able to go to your CloudFormation stack in the console to view the error message in the events tab as a workaround.

The error message in the console is handled by the API call we make to CloudFormation, I'm not sure how easy it would be to make the message persist in the terminal, but it would certainly be helpful if the descriptive error never disappeared

@melhakim
Copy link

melhakim commented May 7, 2024

+1 on this one. There's also no log file in cdk.out that stores these error messages. I have to redeploy and quickly copy the error before it gets wiped off the terminal

@nmussy
Copy link
Contributor

nmussy commented May 7, 2024

I often end up going to the events tab of the CloudFormation web console to quickly identify which resource failed, and for what reason. This might be the best way to show this information (the resource name, type, event message) at the end of the deployment, followed by the stack trace

@melhakim
Copy link

melhakim commented May 7, 2024

Identifying the resource is just one step. But if you don't know why it is failing, debugging can be very difficult.

@ethyaan
Copy link

ethyaan commented Jul 9, 2024

this just started to happen to me.

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. effort/medium Medium work item – several days of effort p1 package/tools Related to AWS CDK Tools or CLI
Projects
None yet
Development

No branches or pull requests

5 participants