Log the Phase Output In Its Raw Form #1432
Merged
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.
Change Overview
This PR is a follow-up of a1d4240, where the
format.Writer()
was updated to skip the logging of all phase outputs encountered bykube.ExecOutput()
. That change broke some output artifacts processing code due to the missing phase outputs. This PR adds the phase outputs back to the logs in its raw, unformatted form. The raw form ensures that later output parsing code doesn't have to handle any prefixed log metadata. This change aligns with the previousimplementation in
kube.Exec()
as seen at:kanister/pkg/function/kube_exec.go
Lines 94 to 101 in c3ee585
With this change, the phase outputs will be logged in their raw format in the controller stdout. E.g.,
Pull request type
Please check the type of change your PR introduces:
Test Plan
Added new unit test in
pkg/format/format_test.go
.Also tested with these blueprints: