Skip to content

vendor: revert github.com/moby/go-archive v0.2.1 - #7005

Merged
crazy-max merged 4 commits into
moby:masterfrom
crazy-max:revert-go-archive-0.2.1-add-test
Jul 31, 2026
Merged

vendor: revert github.com/moby/go-archive v0.2.1#7005
crazy-max merged 4 commits into
moby:masterfrom
crazy-max:revert-go-archive-0.2.1-add-test

Conversation

@crazy-max

@crazy-max crazy-max commented Jul 31, 2026

Copy link
Copy Markdown
Member

relates to:

This reverts the go-archive bump from v0.2.0 to v0.2.1 introiduced in #7005 because v0.2.1 regresses Dockerfile ADD extraction for tar archives that contain a directory entry whose parent directory is only implied by the tar path. BuildKit is affected through the local archive extraction path in solver/llbsolver/file/unpack.go, which uses chrootarchive.Untar.

Jumping directly to go-archive v0.3.0 is not the right patch-release fix. The v0.3.0 release still has the implied-parent directory behavior until moby/go-archive#92 is released, so it does not address the ADD regression by itself. It also brings the newer os.Root extraction changes, which are connected to the separate absolute-symlink compatibility regression reported in moby/moby#53258 and to the BuildKit performance concerns discussed in #6964.

For this BuildKit patch release, the lowest-risk fix is to restore the last known-good go-archive release and wait for an upstream go-archive patch release that includes moby/go-archive#92. A later bump can then evaluate the complete fixed go-archive release, including the os.Root behavior and the performance impact, as its own change.

This was reproduced with a local Dockerfile build using ADD layer.tar.gz /, which fails on current BuildKit with mkdir /etc/dnf: no such file or directory. This PR adds integration coverage for that implied-parent archive shape and also adds coverage for extracting archive contents through an absolute symlink such as /var/run -> /run, so future go-archive bumps have tests for both compatibility cases.

This reverts commit 53b2d03.

Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
@crazy-max crazy-max added this to the v0.32.1 milestone Jul 31, 2026
@crazy-max
crazy-max marked this pull request as ready for review July 31, 2026 11:23
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
@crazy-max
crazy-max merged commit 275d686 into moby:master Jul 31, 2026
223 of 224 checks passed
@crazy-max
crazy-max deleted the revert-go-archive-0.2.1-add-test branch July 31, 2026 14:14
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.

2 participants