Repository navigation
Fix docker build ignoring remote context download errors - #7374
Closed
bunnysayzz wants to merge 1 commit into
Closed
bunnysayzz wants to merge 1 commit into
bunnysayzz wants to merge 1 commit into
Conversation
When the remote context download fails (e.g. HTTP 404), runBuild swallowed the error and continued with a nil build context, tarring an empty context and sending it to the daemon. Every other context-type branch returns the error; the remote branch only flushed the progress buffer in quiet mode and fell through. Return the download error like the other branches do, after flushing the progress buffer in quiet mode. Signed-off-by: bunnysayzz <stfuazzo@gmail.com>
Member
|
duplicate of #7373 |
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: #7372
Summary
runBuildswallowed errors fromGetContextFromURL. When the remote context download failed (e.g. HTTP 404), the remote-context branch only flushed the progress buffer in quiet mode and fell through with a nil build context, so the CLI tarred an empty context and sent it to the daemon instead of reporting the download error. Every other context-type branch returns the error. This makes the remote branch do the same, after the quiet-mode flush.Change is in
cli/command/image/build.go(runBuild,build.ContextTypeRemotecase).Release notes
Verification: traced the code path at current master; the fix mirrors the error handling of the stdin/local/git branches. No Go toolchain on this machine, so not compiled or run here.