-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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: --quiet flag suppresses "Stack stack-name" messages also for stacks which do have changes #27128
cdk-cli: --quiet flag suppresses "Stack stack-name" messages also for stacks which do have changes #27128
Comments
The desired output of the |
@sakurai-ryo @nomike Hello, I'm a member of the CDK team and I've been investigating this issue. I notice that some progress has been made on it. I'm reaching out to see if either of you would like to take ownership of this task, or if you prefer, I can handle it myself? |
Hi @SankyRed |
@sakurai-ryo No hurry, the CDK team is looking into P1s, and since you've made progress on it, I wanted to check if you'd be interested in getting it over the line. I could follow up with you, and if not, I can take it on. |
Comments on closed issues and PRs are hard for our team to see. |
1 similar comment
Comments on closed issues and PRs are hard for our team to see. |
Describe the bug
I originally filed a feature request #26526 to suppress output of
When you have a lot of stacks and want to know what will be change on deploy, those messages clutter the output and one might miss the real changes in between.
The
--quiet
flag was introduced in pull request 26652. Using this flag however, suppresses "Stack stackname" also for stacks which do have changes, so it's not clear anymore to which stack a change belongs.Expected Behavior
Output without using the
--quiet
flag:Current Behavior
Output when using the
--quiet
flag:Reproduction Steps
Introduce changes to your stacks, run
cdk diff --quiet
.Possible Solution
I have written a wrapper for cdk in the past, which added parallel deployments (unfortunately company policy prevents me from sharing the source). I've added a feature like this in my code.
If the operating mode is "diff", the output for each stack is cached and printed all at once, once the stack is processed. This is to prevent the output of stacks becoming all mixed up. In other modes ("deploy", "destroy", ...) this caching does not happen, as you want to see immediately if something goes wrong, so you could introduce emergency counter-measures.
When the "--quiet" flag is present (I named it "--suppress-unchanged-stacks"), at the end of a stacks diff, the code checks whether the line ~"^There were no differences$" is part of the output and just skips printing it to the screen if it is.
As my script was an external wrapper I was fairly limited in how to do this. Thus that solution has a lot of short-comings and potential issues (e.g. it doesn't work at all with i18n or l10n).
I'm sure that inside the cdk codebase itself a much more resilient method could be found to assert whether there have been changes in a stack.
Additional Information/Context
No response
CDK CLI Version
2.94.0 (build 987c329)
Framework Version
No response
Node.js Version
v20.5.1
OS
Ubuntu 22.04.3 LTS
Language
Typescript, Python, .NET, Java, Go
Language Version
not applicable
Other information
No response
The text was updated successfully, but these errors were encountered: