-
Notifications
You must be signed in to change notification settings - Fork 38
fix(cli): diff always prints stack name #304
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
Conversation
Stack UnChangedChild | ||
There were no differences`); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this was missed in #264; it should have not been removed, and would have alerted us of the issue.
it also shows an additional thing that this PR fixes. previously, the comment There were no differences
was printed separately from the diff (on console, it renders the same). now it is included in the formatted diff itself
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #304 +/- ##
==========================================
- Coverage 85.54% 85.45% -0.10%
==========================================
Files 222 222
Lines 36926 36925 -1
Branches 4458 4445 -13
==========================================
- Hits 31588 31553 -35
- Misses 5248 5274 +26
- Partials 90 98 +8
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Signed-off-by: github-actions <[email protected]>
Fixes #302
In #264, we capture the output of the Formatter into a stream, and that is then converted to a string. This diff only gets printed if the diff isn't empty, but by some quirk
formatStackDiff
used to print the stack name outside of the stream, thus creating the (correct) behavior. #264 made sure thatformat
doesn't print, so we need to make sure that the consumer offormatStackDiff
prints the relevant info.This PR makes sure that the stack name is returned as the formatted diff even if the actual diff is empty. We will print the right information when we print the formatted diff now.
I also made similar modifications to
formatSecurityDiff
, as we should move away fromformat
methods printing anything at all.BEFORE (cdk 2.1006.0):
AFTER (my local cdk):
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license