Skip to content

cli/command/image: close ProgressReader#6808

Open
thaJeztah wants to merge 1 commit intodocker:masterfrom
thaJeztah:build_close_reader
Open

cli/command/image: close ProgressReader#6808
thaJeztah wants to merge 1 commit intodocker:masterfrom
thaJeztah:build_close_reader

Conversation

@thaJeztah
Copy link
Member

progress.NewProgressReader implements io.ReadCloser. client.ImageBuild only requests an io.Reader, and there's some code in place to assert if the passed io.Reader was an io.ReadCloser, but let's make sure it's closed just in case.

- Human readable description for the release notes

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

progress.NewProgressReader implements io.ReadCloser. client.ImageBuild only
requests an io.Reader, and there's some code in place to assert if the passed
io.Reader was an io.ReadCloser, but let's make sure it's closed just in case.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
@thaJeztah thaJeztah added this to the 29.2.2 milestone Feb 19, 2026
@codecov-commenter
Copy link

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@thaJeztah
Copy link
Member Author

Ah, hm.. yeah, looks like this won't work, or needs looking into;

--- FAIL: TestRunBuildDockerfileFromStdinWithCompress (0.00s)
    build_test.go:53: assertion failed: error is not nil: io: read/write on closed pipe
--- FAIL: TestRunBuildDockerfileOutsideContext (0.00s)
    build_test.go:113: assertion failed: error is not nil: io: read/write on closed pipe
time="2026-02-19T10:12:59Z" level=error msg="Can't add file /private/var/folders/75/ggvb9t6x5mlbs46lkdhlcbyc0000gn/T/TestRunBuildDockerfileOutsideContext-1024026542/data to tar: io: read/write on closed pipe"
time="2026-02-19T10:12:59Z" level=error msg="Can't close tar writer: io: read/write on closed pipe"
time="2026-02-19T10:13:00Z" level=error msg="Can't close tar writer: io: read/write on closed pipe"
time="2026-02-19T10:13:00Z" level=error msg="Can't add file /private/var/folders/75/ggvb9t6x5mlbs46lkdhlcbyc0000gn/T/TestRunBuildWithSymlinkedContext-2937020932/context/Dockerfile to tar: io: read/write on closed pipe"
time="2026-02-19T10:13:00Z" level=error msg="Can't close tar writer: io: read/write on closed pipe"
--- FAIL: TestRunBuildWithSymlinkedContext (0.00s)
    build_test.go:172: assertion failed: error is not nil: io: read/write on closed pipe

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

Comments