Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cmd/go/internal/modfetch/codehost: test fails with git 2.47.1 #71261

Open
ianlancetaylor opened this issue Jan 14, 2025 · 5 comments
Open

cmd/go/internal/modfetch/codehost: test fails with git 2.47.1 #71261

ianlancetaylor opened this issue Jan 14, 2025 · 5 comments
Labels
BugReport Issues describing a possible bug in the Go implementation.

Comments

@ianlancetaylor
Copy link
Member

Go version

HEAD

Output of go env in your module/workspace:

AR='ar'
CC='gcc'
CGO_CFLAGS='-O2 -g'
CGO_CPPFLAGS=''
CGO_CXXFLAGS='-O2 -g'
CGO_ENABLED='1'
CGO_FFLAGS='-O2 -g'
CGO_LDFLAGS='-O2 -g'
CXX='g++'
GCCGO='gccgo'
GO111MODULE=''
GOAMD64='v1'
GOARCH='amd64'
GOAUTH='netrc'
GOBIN=''
GOCACHE='/home/iant/.cache/go-build'
GOCACHEPROG=''
GODEBUG=''
GOENV='/home/iant/.config/go/env'
GOEXE=''
GOEXPERIMENT=''
GOFIPS140='off'
GOFLAGS=''
GOGCCFLAGS='-fPIC -m64 -pthread -Wl,--no-gc-sections -fmessage-length=0 -ffile-prefix-map=/tmp/go-build1332981680=/tmp/go-build -gno-record-gcc-switches'
GOHOSTARCH='amd64'
GOHOSTOS='linux'
GOINSECURE=''
GOMOD='/dev/null'
GOMODCACHE='/home/iant/gopath/pkg/mod'
GONOPROXY=''
GONOSUMDB=''
GOOS='linux'
GOPATH='/home/iant/gopath'
GOPRIVATE=''
GOPROXY='https://proxy.golang.org'
GOROOT='/home/iant/go'
GOSUMDB='sum.golang.org'
GOTELEMETRY='on'
GOTELEMETRYDIR='/home/iant/.config/go/telemetry'
GOTMPDIR=''
GOTOOLCHAIN='auto'
GOTOOLDIR='/home/iant/go/pkg/tool/linux_amd64'
GOVCS=''
GOVERSION='devel go1.24-431c67ec4b Mon Jan 13 15:16:24 2025 -0800'
GOWORK=''
PKG_CONFIG='pkg-config'

What did you do?

go test cmd/go/internal/modfetch/codehost

(This is run as part of all.bash).

What did you see happen?

vcs-test.golang.org rerouted to http://127.0.0.1:43021
https://vcs-test.golang.org rerouted to https://127.0.0.1:37841
--- FAIL: TestStat (0.00s)
    --- FAIL: TestStat/gitrepo1/HEAD (1.02s)
        git_test.go:662: Stat: incorrect info
            have {Origin:<nil> Name:ede458df7cd0fdca520df19a33158086a8a68e81 Short:ede458df7cd0 Version:ede458df7cd0fdca520df19a33158086a8a68e81 Time:2018-04-17 19:43:22 +0000 UTC Tags:[]}
            want {Origin:<nil> Name:ede458df7cd0fdca520df19a33158086a8a68e81 Short:ede458df7cd0 Version:ede458df7cd0fdca520df19a33158086a8a68e81 Time:2018-04-17 19:43:22 +0000 UTC Tags:[v1.2.3 v1.2.4-annotated]}
    --- FAIL: TestStat/gitrepo1/ede458df (0.07s)
        git_test.go:662: Stat: incorrect info
            have {Origin:<nil> Name:ede458df7cd0fdca520df19a33158086a8a68e81 Short:ede458df7cd0 Version:ede458df7cd0fdca520df19a33158086a8a68e81 Time:2018-04-17 19:43:22 +0000 UTC Tags:[v1.2.4-annotated]}
            want {Origin:<nil> Name:ede458df7cd0fdca520df19a33158086a8a68e81 Short:ede458df7cd0 Version:ede458df7cd0fdca520df19a33158086a8a68e81 Time:2018-04-17 19:43:22 +0000 UTC Tags:[v1.2.3 v1.2.4-annotated]}
    --- FAIL: TestStat/gitrepo1/v1.2.4-annotated (1.12s)
        git_test.go:662: Stat: incorrect info
            have {Origin:<nil> Name:ede458df7cd0fdca520df19a33158086a8a68e81 Short:ede458df7cd0 Version:v1.2.4-annotated Time:2018-04-17 19:43:22 +0000 UTC Tags:[v1.2.4-annotated]}
            want {Origin:<nil> Name:ede458df7cd0fdca520df19a33158086a8a68e81 Short:ede458df7cd0 Version:v1.2.4-annotated Time:2018-04-17 19:43:22 +0000 UTC Tags:[v1.2.3 v1.2.4-annotated]}
FAIL
FAIL	cmd/go/internal/modfetch/codehost	38.401s
FAIL

What did you expect to see?

ok  	cmd/go/internal/modfetch/codehost	6.896s

This test has started failing with earlier versions of Go as well. My assumption is that it is due to an updated version of git on my system.

@ianlancetaylor
Copy link
Member Author

@gopherbot Please open backport issues

This test is failing with older versions of Go, presumably because of a newer versions of git. We should backport the fix to supported versions, so that people using older Go versions don't complain when the update to a newer version of git.

@gopherbot
Copy link
Contributor

Backport issue(s) opened: #71262 (for 1.22), #71263 (for 1.23).

Remember to create the cherry-pick CL(s) as soon as the patch is submitted to master, according to https://go.dev/wiki/MinorReleases.

@gopherbot
Copy link
Contributor

Change https://go.dev/cl/642377 mentions this issue: cmd/go/internal/modfetch/codehost: add --unshallow to git fetch

@gabyhelp gabyhelp added the BugReport Issues describing a possible bug in the Go implementation. label Jan 14, 2025
@gopherbot
Copy link
Contributor

Change https://go.dev/cl/642437 mentions this issue: cmd/go/internal/modfetch: do not trust server to send all tags in shallow fetch

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
BugReport Issues describing a possible bug in the Go implementation.
Projects
None yet
Development

No branches or pull requests

3 participants