Skip to content

x/tools/internal/modindex: TestIncremental failures #70121

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

Closed
abner-chenc opened this issue Oct 30, 2024 · 4 comments
Closed

x/tools/internal/modindex: TestIncremental failures #70121

abner-chenc opened this issue Oct 30, 2024 · 4 comments
Labels
NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. Tools This label describes issues relating to any tools in the x/tools repository.
Milestone

Comments

@abner-chenc
Copy link
Contributor

Go version

go version go1.23.2 linux/amd64

Output of go env in your module/workspace:

GO111MODULE=''
GOARCH='amd64'
GOBIN=''
GOCACHE='/tmp/abner/gocache'
GOENV='/home/data/chenguoqi/.config/go/env'
GOEXE=''
GOEXPERIMENT=''
GOFLAGS=''
GOHOSTARCH='amd64'
GOHOSTOS='linux'
GOINSECURE=''
GOMODCACHE='/home/data/chenguoqi/go/pkg/mod'
GONOPROXY=''
GONOSUMDB=''
GOOS='linux'
GOPATH='/home/data/chenguoqi/go'
GOPRIVATE=''
GOPROXY='https://proxy.golang.org,direct'
GOROOT='/usr/lib/go-1.23'
GOSUMDB='sum.golang.org'
GOTMPDIR='/tmp/abner/gotmp'
GOTOOLCHAIN='auto'
GOTOOLDIR='/usr/lib/go-1.23/pkg/tool/linux_amd64'
GOVCS=''
GOVERSION='go1.23.2'
GODEBUG=''
GOTELEMETRY='local'
GOTELEMETRYDIR='/home/data/chenguoqi/.config/go/telemetry'
GCCGO='gccgo'
GOAMD64='v1'
AR='ar'
CC='gcc'
CXX='g++'
CGO_ENABLED='1'
GOMOD='/home/data/chenguoqi/golang/tools/go.mod'
GOWORK=''
CGO_CFLAGS='-O2 -g'
CGO_CPPFLAGS=''
CGO_CXXFLAGS='-O2 -g'
CGO_FFLAGS='-O2 -g'
CGO_LDFLAGS='-O2 -g'
PKG_CONFIG='pkg-config'
GOGCCFLAGS='-fPIC -m64 -pthread -Wl,--no-gc-sections -fmessage-length=0 -ffile-prefix-map=/tmp/abner/gotmp/go-build1792354112=/tmp/go-build -gno-record-gcc-switches'

What did you do?

$ timedatectl:

   Local time: 三 2024-10-30 14:59:40 CST
           Universal time: 三 2024-10-30 06:59:40 UTC
                 RTC time: 三 2024-10-30 06:59:40
                Time zone: Asia/Shanghai (CST, +0800)
System clock synchronized: yes
              NTP service: active
          RTC in local TZ: no

go test -a -run=TestIncremental

What did you see happen?

2024/10/30 15:01:34 2 Entries 2 names
2024/10/30 15:01:34 DIR: bad,guy.com/[email protected]
2024/10/30 15:01:34 3 Entries 3 names
--- FAIL: TestIncremental (0.00s)
    dir_test.go:96: failed to write updated index
    dir_test.go:113: mismatching indexes (-updated +cleared):
          &modindex.Index{
          	Version:  0,
          	Cachedir: "/tmp/TestIncremental2843741221/001",
          	Changed:  s"2024-10-30 15:01:33 +0000 UTC",
          	Entries: []modindex.Entry{
          		{
        - 			Dir:        "bad,guy.com/[email protected]",
        + 			Dir:        "cloud.google.com/[email protected]/compute/metadata",
        - 			ImportPath: "bad,guy.com/go",
        + 			ImportPath: "cloud.google.com/go/compute/metadata",
          			PkgName:    "foo",
        - 			Version:    "v0.1.0",
        + 			Version:    "v0.94.0",
          			Names:      {"Foo F 0"},
          		},
          		{
          			Dir: strings.Join({
          				"cloud.google.com/go",
        - 				"/[email protected]/metadata",
        + 				"@v0.94.0/longrunning",
          			}, ""),
        - 			ImportPath: "cloud.google.com/go/compute/metadata",
        + 			ImportPath: "cloud.google.com/go/longrunning",
          			PkgName:    "foo",
        - 			Version:    "v1.7.0",
        + 			Version:    "v0.94.0",
          			Names:      {"Foo F 0"},
          		},
        - 		{
        - 			Dir:        "cloud.google.com/[email protected]/longrunning",
        - 			ImportPath: "cloud.google.com/go/longrunning",
        - 			PkgName:    "foo",
        - 			Version:    "v0.104.0",
        - 			Names:      []string{"Foo F 0"},
        - 		},
          	},
          }
2024/10/30 15:01:34 2 Entries 2 names
2024/10/30 15:01:34 DIR: bad,guy.com/[email protected]
2024/10/30 15:01:34 3 Entries 3 names
--- FAIL: TestIncrementalNope (0.00s)
    dir_test.go:148: failed to write updated index
    dir_test.go:165: mismatching indexes (-updated +cleared):
          &modindex.Index{
          	Version:  0,
          	Cachedir: "/tmp/TestIncrementalNope1117954343/001",
          	Changed:  s"2024-10-30 15:01:33 +0000 UTC",
          	Entries: []modindex.Entry{
        - 		{
        - 			Dir:        "bad,guy.com/[email protected]",
        - 			ImportPath: "bad,guy.com/go",
        - 			PkgName:    "foo",
        - 			Version:    "v0.1.0",
        - 			Names:      []string{"Foo F 0"},
        - 		},
          		{Dir: "cloud.google.com/go/[email protected]/metadata", ImportPath: "cloud.google.com/go/compute/metadata", PkgName: "foo", Version: "v1.7.0", ...},
          		{Dir: "cloud.google.com/[email protected]/longrunning", ImportPath: "cloud.google.com/go/longrunning", PkgName: "foo", Version: "v0.104.0", ...},
          	},
          }
FAIL
exit status 1
FAIL	golang.org/x/tools/internal/modindex	0.003s

What did you expect to see?

Test passed

@gopherbot gopherbot added the Tools This label describes issues relating to any tools in the x/tools repository. label Oct 30, 2024
@gopherbot gopherbot added this to the Unreleased milestone Oct 30, 2024
@abner-chenc abner-chenc changed the title x/tools/internal/modindex: TestIncremental failed x/tools/internal/modindex: TestIncremental failures Oct 30, 2024
@gopherbot
Copy link
Contributor

Change https://go.dev/cl/623455 mentions this issue: internal/modindex: unified use of UTC time

@cagedmantis cagedmantis added the NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. label Oct 31, 2024
@cagedmantis
Copy link
Contributor

cc @golang/tools-team

@abner-chenc
Copy link
Contributor Author

This bug was fixed in CL https://go-review.googlesource.com/c/tools/+/624615

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. Tools This label describes issues relating to any tools in the x/tools repository.
Projects
None yet
Development

No branches or pull requests

4 participants