Skip to content
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

Log kaniko errors that happen during the tar phase #6901

Merged
merged 1 commit into from
Dec 13, 2021

Conversation

pearj
Copy link
Contributor

@pearj pearj commented Nov 24, 2021

Description
When kaniko has any errors while creating the docker tar context, they are completely lost. This change logs those errors if the kubectl run fails.
I found that if you are using build arguments and you forget to provide them, then those errors surface as tar errors, I think because dependencies are resolved as part of creating the docker tar context.

I am not a go programmer, so I hope that this change is the right way to surface these errors.

Since this is just increasing error logging, I don't think it makes sense to add unit tests.

The other caveat is that you can only see these errors with concurrency set to 1, but I think that is a separate bug.

@pearj pearj requested a review from a team as a code owner November 24, 2021 06:40
@pearj pearj requested a review from gsquared94 November 24, 2021 06:40
@google-cla google-cla bot added the cla: no label Nov 24, 2021
@pearj pearj force-pushed the log-kaniko-tar-errors branch from eb6c7ec to c73b152 Compare November 24, 2021 06:42
@pearj pearj force-pushed the log-kaniko-tar-errors branch from c73b152 to 6ce7070 Compare November 24, 2021 06:46
@google-cla google-cla bot added cla: yes and removed cla: no labels Nov 24, 2021
@tejal29 tejal29 enabled auto-merge (squash) December 10, 2021 13:13
@codecov
Copy link

codecov bot commented Dec 10, 2021

Codecov Report

Merging #6901 (6ce7070) into main (290280e) will decrease coverage by 1.34%.
The diff coverage is 61.83%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #6901      +/-   ##
==========================================
- Coverage   70.48%   69.13%   -1.35%     
==========================================
  Files         515      547      +32     
  Lines       23150    25087    +1937     
==========================================
+ Hits        16317    17344    +1027     
- Misses       5776     6580     +804     
- Partials     1057     1163     +106     
Impacted Files Coverage Δ
cmd/skaffold/app/cmd/deploy.go 52.00% <ø> (-1.85%) ⬇️
cmd/skaffold/app/cmd/dev.go 84.61% <0.00%> (ø)
cmd/skaffold/app/cmd/flags.go 91.00% <0.00%> (+0.18%) ⬆️
cmd/skaffold/app/cmd/render.go 36.66% <0.00%> (-4.72%) ⬇️
cmd/skaffold/skaffold.go 0.00% <0.00%> (ø)
cmd/skaffold/app/cmd/inspect_tests.go 62.50% <14.28%> (-1.14%) ⬇️
cmd/skaffold/app/cmd/fix.go 68.85% <40.00%> (-7.62%) ⬇️
cmd/skaffold/app/cmd/lint.go 42.85% <42.85%> (ø)
cmd/skaffold/app/cmd/find_configs.go 48.88% <50.00%> (+0.24%) ⬆️
cmd/skaffold/app/skaffold.go 76.19% <70.00%> (-8.43%) ⬇️
... and 164 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 2e5439d...6ce7070. Read the comment docs.

@tejal29 tejal29 added the kokoro:force-run forces a kokoro re-run on a PR label Dec 13, 2021
@kokoro-team kokoro-team removed the kokoro:force-run forces a kokoro re-run on a PR label Dec 13, 2021
@tejal29 tejal29 merged commit 248b74e into GoogleContainerTools:main Dec 13, 2021
@pearj pearj deleted the log-kaniko-tar-errors branch December 13, 2021 20:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants