(cli): Merge --hotswap-fallback behavior to --hotswap CLI flag #26802
Labels
documentation
This is a problem with documentation.
feature-request
A feature should be added or improved.
p1
package/tools
Related to AWS CDK Tools or CLI
Describe the feature
As a team of engineers, using the
cdk watch
command often, I find that people who are relatively new to CDK often make the mistake of assuming that thecdk watch --all --hotswap --require-approval=never --concurrency=5
will "just work".However, my teammates are often surprised when I tell them that the CLI will just "print" (with red text) when non-hotswap compatible resources are found and skip them, and carry on with other Stacks' successful deployments (because of the concurrency flag). This leads to lots of frustration and lost engineering/debugging time, wondering why a new API Gateway endpoint is not working, or whatever the skipped non-hotswappable change was.
Since I have deeper expertise with CDK, I know that the workaround is to use the
--hotswap-fallback
flag, which works intuitively - hotswap what you can, but fallback to ChangeSet based deployment. In the end, the changes are ALWAYS deployed and the end user doesn't have to care about this implementation detail.So I was wondering would it make sense to introduce this intuitive behavior to the normal
--hotswap
flag and deprecate the poorly named and "very limited user case" (in my opinion)--hostwap-fallback
?Use Case
cdk watch --hotswap
should "just work", rather than forcing users to dig deeper and find out about the--hotswap-fallback
flag.Proposed Solution
Fold
--hotswap-fallback
behavior into--hotswap
.Other Information
No response
Acknowledgements
CDK version used
2.89.0
Environment details (OS name and version, etc.)
MacOS
The text was updated successfully, but these errors were encountered: