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

Closed
dmitshur opened this issue Sep 15, 2018 · 8 comments
Closed

cmd/go/internal/modfetch: TestCodeRepoVersions is failing on longtest #27692

dmitshur opened this issue Sep 15, 2018 · 8 comments
Labels
FrozenDueToAge GoCommand cmd/go modules NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. release-blocker Testing An issue that has been verified to require only test changes, not just a test failure.
Milestone

Comments

@dmitshur
Copy link
Contributor

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 cmd/go label Sep 15, 2018
@dmitshur dmitshur changed the title cmd/go/internal/modfetch: TestCodeRepoVersions is failing cmd/go/internal/modfetch: TestCodeRepoVersions is failing on longtest Sep 15, 2018
@natefinch
Copy link
Contributor

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
Copy link
Contributor Author

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

@natefinch
Copy link
Contributor

Umm.....

@ianlancetaylor ianlancetaylor added NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. release-blocker labels Sep 15, 2018
@ianlancetaylor ianlancetaylor added this to the Go1.12 milestone Sep 15, 2018
@dmitshur
Copy link
Contributor Author

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
Copy link
Contributor

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

@bcmills bcmills added Testing An issue that has been verified to require only test changes, not just a test failure. modules labels Sep 17, 2018
@gopherbot
Copy link

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
Copy link

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
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
Copy link

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 subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge GoCommand cmd/go modules NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. release-blocker Testing An issue that has been verified to require only test changes, not just a test failure.
Projects
None yet
Development

No branches or pull requests

5 participants