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: TestCodeRepoVersions is failing on longtest #27692

Open
dmitshur opened this Issue Sep 15, 2018 · 8 comments

Comments

Projects
None yet
5 participants
@dmitshur
Member

dmitshur commented Sep 15, 2018

It started to fail since https://build.golang.org/log/40438df21477eaace5ea36bb0010be8bcfc2bc58 and has been failing on linux-amd64-longtest since. That commit was not related, so I'm guessing the problem is on the internet side.

go: finding github.com/rsc/vgotest1 v0.0.0
go: finding vcs-test.golang.org/hg/vgotest1.hg v0.0.0
go: finding github.com/rsc/vgotest1 v1.0.0
go: finding vcs-test.golang.org/hg/vgotest1.hg v1.0.0
go: finding github.com/rsc/vgotest1/v2 v2.0.0
go: finding vcs-test.golang.org/hg/vgotest1.hg/v2 v2.0.0
go: finding github.com/rsc/vgotest1 80d85c5
go: finding vcs-test.golang.org/hg/vgotest1.hg e125018
go: finding github.com/rsc/vgotest1 mytag
go: finding vcs-test.golang.org/hg/vgotest1.hg mytag
go: finding github.com/rsc/vgotest1/v2 45f53230a
go: finding vcs-test.golang.org/hg/vgotest1.hg/v2 814fce58e
go: finding github.com/rsc/vgotest1/v54321 80d85c5
go: finding vcs-test.golang.org/hg/vgotest1.hg/v54321 e125018
go: finding github.com/rsc/vgotest1/submod v1.0.0
go: finding vcs-test.golang.org/hg/vgotest1.hg/submod v1.0.0
go: finding github.com/rsc/vgotest1/submod v1.0.3
go: finding vcs-test.golang.org/hg/vgotest1.hg/submod v1.0.3
go: finding github.com/rsc/vgotest1/submod v1.0.4
go: finding vcs-test.golang.org/hg/vgotest1.hg/submod v1.0.4
go: finding github.com/rsc/vgotest1 v1.1.0
go: finding vcs-test.golang.org/hg/vgotest1.hg v1.1.0
go: finding github.com/rsc/vgotest1/v2 v2.0.1
go: finding vcs-test.golang.org/hg/vgotest1.hg/v2 v2.0.1
go: finding github.com/rsc/vgotest1/v2 v2.0.3
go: finding vcs-test.golang.org/hg/vgotest1.hg/v2 v2.0.3
go: finding github.com/rsc/vgotest1/v2 v2.0.4
go: finding vcs-test.golang.org/hg/vgotest1.hg/v2 v2.0.4
go: finding github.com/rsc/vgotest1/v2 v2.0.5
go: finding vcs-test.golang.org/hg/vgotest1.hg/v2 v2.0.5
go: finding rsc.io/quote v1.0.0
go: finding swtch.com/testmod v1.0.0
go: finding golang.org/x/text 4e4a3210bb
go: finding github.com/pkg/errors v0.8.0
go: finding github.com/rsc/quote/buggy c4d4236f
go: finding gopkg.in/yaml.v2 d670f940
go: finding gopkg.in/check.v1 20d25e280405
go: finding gopkg.in/yaml.v2 v2
go: finding vcs-test.golang.org/go/mod/gitrepo1 master
go: finding gopkg.in/natefinch/lumberjack.v2 latest
go: finding gopkg.in/natefinch/lumberjack.v2 v2.1
--- FAIL: TestCodeRepoVersions (1.15s)
    --- FAIL: TestCodeRepoVersions/gopkg.in_natefinch_lumberjack.v2 (0.00s)
        coderepo_test.go:535: Versions(""):
            have [v2.0.0]
            want []
go: finding github.com/rsc/empty latest
go: finding github.com/rsc/vgotest1 latest
go: finding github.com/rsc/vgotest1/subdir latest
go: finding swtch.com/testmod latest
FAIL
FAIL	cmd/go/internal/modfetch	31.494s

I can reproduce locally:

$ go version
go version devel +58c6afe075 Fri Sep 14 21:45:02 2018 +0000 darwin/amd64
$ go test -run=TestCodeRepoVersions cmd/go/internal/modfetch
--- FAIL: TestCodeRepoVersions (1.56s)
    --- FAIL: TestCodeRepoVersions/gopkg.in_natefinch_lumberjack.v2 (0.30s)
        coderepo_test.go:535: Versions(""):
            have [v2.0.0]
            want []
FAIL
FAIL	cmd/go/internal/modfetch	1.609s

/cc @rsc @bcmills @ianlancetaylor per owners, and @natefinch since it looks like your package is involved.

@dmitshur dmitshur added the GoCommand label Sep 15, 2018

@dmitshur dmitshur changed the title from cmd/go/internal/modfetch: TestCodeRepoVersions is failing to cmd/go/internal/modfetch: TestCodeRepoVersions is failing on longtest Sep 15, 2018

@natefinch

This comment has been minimized.

Contributor

natefinch commented Sep 15, 2018

I pushed a v2.0.0 tag to lumberjack very recently, to help module code figure out what to get... maybe I screwed up the tag?

@dmitshur

This comment has been minimized.

Member

dmitshur commented Sep 15, 2018

From a glance, it looks like the test expects the tag not to be there.

@natefinch

This comment has been minimized.

Contributor

natefinch commented Sep 15, 2018

Umm.....

@dmitshur

This comment has been minimized.

Member

dmitshur commented Sep 15, 2018

It's not very urgent to fix this, I just filed the issue so we don't forget.

The test was added 3 months ago in CL 118095 by @rsc. I'd wait for his comments on how to best resolve this.

It might be just a matter of updating the testdata to expect a v2.0.0 tag:

{
path: "gopkg.in/natefinch/lumberjack.v2",
versions: nil,
},

It might also be worth rethinking whether the test should depend on your repo tags not changing.

@bcmills

This comment has been minimized.

Member

bcmills commented Sep 15, 2018

Yeah, we need to move the test over to some stable repo on vcs-test, or maybe just remove that case

@gopherbot

This comment has been minimized.

gopherbot commented Sep 18, 2018

Change https://golang.org/cl/136136 mentions this issue: cmd/go/internal/modfetch: remove test assumptions about external repo tags

@bcmills bcmills self-assigned this Sep 19, 2018

@gopherbot

This comment has been minimized.

gopherbot commented Sep 26, 2018

Change https://golang.org/cl/137775 mentions this issue: cmd/go/internal/modfetch: update expected tags for external repos

gopherbot pushed a commit that referenced this issue Sep 27, 2018

cmd/go/internal/modfetch: update expected tags for external repos
Updates #27692

Change-Id: Ia32b9e401dfe1fbb64b7f1311d85b7a1ab959bc0
Reviewed-on: https://go-review.googlesource.com/137775
Run-TryBot: Alberto Donizetti <alb.donizetti@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Bryan C. Mills <bcmills@google.com>
@gopherbot

This comment has been minimized.

gopherbot commented Dec 10, 2018

Change https://golang.org/cl/153460 mentions this issue: cmd/go/internal/modfetch: update TestCodeRepo for gopkg.in/yaml.v2 v2.2.2

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