fix: print output from post render hook in console when withChange: false#9258
Merged
renzodavid9 merged 2 commits intoJan 18, 2024
Merged
Conversation
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## main #9258 +/- ##
==========================================
- Coverage 70.48% 63.64% -6.85%
==========================================
Files 515 632 +117
Lines 23150 32607 +9457
==========================================
+ Hits 16317 20752 +4435
- Misses 5776 10258 +4482
- Partials 1057 1597 +540 ☔ View full report in Codecov by Sentry. |
8146350 to
5131626
Compare
ericzzzzzzz
approved these changes
Jan 18, 2024
Closed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes: #9262
Description
This PR sends stdout to the post-render hooks, when
withChange: false, so user can print content from their associated script and see it in consoleFrom
skaffold/cmd/skaffold/app/cmd/cmd.go
Line 94 in 5904a97
Decided to get the writer from the logger instead of calling
os.Stderrdirectly so we share the same behaviour in case the logger changes, e.g., printing to a document (that's something that can not do today)Changed back the
Starting post-render hooks..., etc, messages to useoutput.Default.Fprintlnso we print theERROlabelFollow-up Work
stdoutandstderrto the post-render hooks whenwithChange: trueso users can print info content + the rendered manifests