(cli): cdk watch does not recover if there is an error in cdk stack/app #27864
Labels
bug
This issue is a bug.
cli
Issues related to the CDK CLI
effort/small
Small work item – less than a day of effort
p2
package/tools
Related to AWS CDK Tools or CLI
Describe the bug
If I made an error that does not resolve into a valid cloudformation, cdk watch throws the error on console. However, if I fix that issue, I would expect cdk to detect the issue to resolve and deploy the correct cloudformation template. CDK watch gets hung instead.
Expected Behavior
Expect cdk watch to redeploy once the error has been fixed.
Current Behavior
If I made an error that does not resolve into a valid cloudformation, cdk watch throws the error on console. However, if I fix that issue, CDK watch gets hung. It detects the change but does not deploy.
Reproduction Steps
This is a valid stack and app :
If I update it to the following while cdk watch is running, cdk watch will throw the error but stays hung after I fix the error (remove a mistyped N in this case):
This happens with stack level changes as well.
Detects change but does not deploy, stays in hung state :
Possible Solution
No response
Additional Information/Context
No response
CDK CLI Version
v2.100.0
Framework Version
No response
Node.js Version
v18.16.0
OS
MAC
Language
Python
Language Version
3.10.6
Other information
Reproducible with typescript too
Workaround is to interrupt the terminal and re run cdk watch.
The text was updated successfully, but these errors were encountered: