Skip to content

fix: return remote context download errors - #7373

Merged
thaJeztah merged 1 commit into
docker:masterfrom
TanvirTian:7372-fix-remote-context-download-error
Oct 10, 2026
Merged

thaJeztah merged 1 commit into
docker:masterfrom
TanvirTian:7372-fix-remote-context-download-error

Conversation

@TanvirTian

@TanvirTian TanvirTian commented Oct 9, 2026 •

Copy link
Copy Markdown
Contributor

Summary

This PR fixes docker build ignoring remote context download errors by returning the error immediately instead of continuing the build.

A picture of a cute animal (not mandatory but encouraged)

268e903347ae1005c1b8ff9bf56c8f28

@codecov-commenter

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 50.00000% with 2 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
cli/command/image/build.go 50.00% 1 Missing and 1 partial ⚠️

📢 Thoughts on this report? Let us know!

@thaJeztah thaJeztah left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for contributing! Code changes look good, but I left a minor comment.

Can you also update your DCO sign-off to use your real name, not your GItHub handle?

Signed-off-by: TanvirTian <beachpilis@gmail.com>

(The LinkedIN profile on your account says "Tanvir Ahmed Tian", so probably "Tanvir Tian" ?)

You can change this setting in your GitHub settings as well so that it's done automatically next time you open a PR.

When updating, please amend the commit, and not push it as a second commit (so that it doesn't have to be squashed afterwards).

Comment thread cli/command/image/build_test.go Outdated
return names
}

func TestRunBuildRemoteContextDownloadError(t *testing.T) {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor nit; could you move this tests further up, so that it's before the fakeBuild utility? That keeps the tests together and the (shared) utility not landing in some random place half-way in the file;

type fakeBuild struct {

When updating, can you also add a brief description to the test? In this case it's probably obvious from the test, but having a short reminder what it was originally for can be useful if the test evolves over time, and (in some cases) have lost its purpose.

// TestRunBuildRemoteContextDownloadError verifies that remote context
// download errors are propagated.
//
// regression test for https://github.com/docker/cli/issues/7372

Signed-off-by: Tanvir Tian <beachpilis@gmail.com>
@TanvirTian
TanvirTian force-pushed the 7372-fix-remote-context-download-error branch from a7cc3ab to 067d069 Compare October 10, 2026 12:18
@TanvirTian

Copy link
Copy Markdown
Contributor Author

all done 🐈

@thaJeztah thaJeztah left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@thaJeztah
thaJeztah merged commit e407805 into docker:master Oct 10, 2026
103 checks passed
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.

docker build ignores remote context download errors

3 participants