Repository navigation
Closed
Milestone
Description
Summary
Latest go version 1.26.5 broke some tests in go-archive. Here's the test output:
[1783524239] Tarfs Suite - 12/12 specs - 9 procs ••
------------------------------
• [FAILED] [0.002 seconds]
ExtractEntry hard links [It] turns absolute paths into relative paths inside dest
/Users/taylor/workspace/concourse/concourse/go-archive/tarfs/extract_test.go:178
Timeline >>
STEP: creating the target of the hard link @ 07/08/26 11:23:59.647
[FAILED] in [It] - /Users/taylor/workspace/concourse/concourse/go-archive/tarfs/extract_test.go:189 @ 07/08/26 11:23:59.648
<< Timeline
[FAILED] Unexpected error:
<*fs.PathError | 0x7a1c1ee0e600>:
mkdirat absolute/path/: no such file or directory
{
Op: "mkdirat",
Path: "absolute/path/",
Err: <syscall.Errno>0x2,
}
occurred
In [It] at: /Users/taylor/workspace/concourse/concourse/go-archive/tarfs/extract_test.go:189 @ 07/08/26 11:23:59.648
------------------------------
•••••••••
Summarizing 1 Failure:
[FAIL] ExtractEntry hard links [It] turns absolute paths into relative paths inside dest
/Users/taylor/workspace/concourse/concourse/go-archive/tarfs/extract_test.go:189
Ran 12 of 12 Specs in 0.022 seconds
FAIL! -- 11 Passed | 1 Failed | 0 Pending | 0 Skipped
[1783524239] Tgzfs Suite - 8/8 specs - 9 procs •••••••• SUCCESS! 20.135ms
[1783524239] Zipfs Suite - 2/2 specs - 9 procs
------------------------------
• [FAILED] [0.002 seconds]
Extract [JustBeforeEach] when 'unzip' is not in the PATH extracts the ZIP's files, generating directories, and honoring file permissions and symlinks
[JustBeforeEach] /Users/taylor/workspace/concourse/concourse/go-archive/zipfs/extract_test.go:68
[It] /Users/taylor/workspace/concourse/concourse/go-archive/zipfs/extract_test.go:138
[FAILED] Unexpected error:
<*fs.PathError | 0x5303aae8c2d0>:
mkdirat ./empty-dir/: no such file or directory
{
Op: "mkdirat",
Path: "./empty-dir/",
Err: <syscall.Errno>0x2,
}
occurred
In [JustBeforeEach] at: /Users/taylor/workspace/concourse/concourse/go-archive/zipfs/extract_test.go:70 @ 07/08/26 11:24:00.315
------------------------------
•
Summarizing 1 Failure:
[FAIL] Extract [JustBeforeEach] when 'unzip' is not in the PATH extracts the ZIP's files, generating directories, and honoring file permissions and symlinks
/Users/taylor/workspace/concourse/concourse/go-archive/zipfs/extract_test.go:70
Ran 2 of 2 Specs in 0.009 seconds
FAIL! -- 1 Passed | 1 Failed | 0 Pending | 0 Skipped
Ginkgo ran 3 suites in 1.281022167s
There were failures detected in the following suites:
tarfs ./go-archive/tarfs
zipfs ./go-archive/zipfs
Test Suite Failed
Looking at the Go release milestone: https://github.com/golang/go/milestone/439?closed=1
This issue seems like a possible culprit: golang/go#79027
Reacted by Aleksandar Licul
Metadata
Metadata
Assignees
Labels
No labels
Activity
taylorsilva commentedon Jul 8, 2026
I think this is a bug in Go. Seems like
root.MkdirAll()func fails to create the path if it ends in a/. It didn't previously do that.Reproducible:
Changing
some/path/tosome/pathworks.taylorsilva commentedon Jul 8, 2026
Reported in golang/go#80308
taylorsilva commentedon Jul 8, 2026
The above I found in the tarfs package. The zipfs package is also failing with a different error, also from
os.Root. Looking into that now.taylorsilva commentedon Jul 8, 2026
So zipfs package was also failing with:
Which is because these paths end in
/, so same issue as above in tarfs:concourse/go-archive/zipfs/extract_test.go
Lines 29 to 36 in b0a1474
Removing the
/at the end of the paths results in a new error:Not sure why that happens and can't reproduce with the
main.goI previously made.For now I'm re-building our images with go1.26.4 just to unblock us. Will keep digging into this and figure out a code workaround.
taylorsilva commentedon Jul 8, 2026
So the zipfs error happens because it seems that zip files only know if a file is a directory if it has a trailing
/, so my workaround of removing the/doesn't work for zip files.Figured this out by looking at the error the
unzipbinary returns in another test in the same suite:Without the trailing
/it creates a filenonempty-dirinstead of a directory.taylorsilva commentedon Jul 8, 2026
I think our only solutions here are either:
ospackage functions which doesn't have this issue withMkdirAllKump3r commentedon Jul 9, 2026
@taylorsilva imho we should maybe try with option one, but if the golang people take their sweet time, we can always go for option 2 at that point. My main concern in going directly for point 2 would be stuff like (
concourse/go-archive/tarfs/extract.go
Lines 107 to 116 in c127dda
taylorsilva commentedon Jul 9, 2026
Just looked at their release history and it looks like patch releases are made at the beginning of each month. So we can't expect a fix until August now.
I guess a third option could be to trim the trailing
/from the filepath. I think I'll just do that and move on from this.taylorsilva commentedon Jul 10, 2026
The upstream issue in Go has been closed and backported to go1.25 and go1.26. We can remove our workaround when the next patch release for go1.26 comes out.