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/modload: e0cf3de987e6 no longer is the latest commit on the master branch #36489

Closed
dmitshur opened this issue Jan 10, 2020 · 2 comments

Comments

@dmitshur
Copy link
Member

@dmitshur dmitshur commented Jan 10, 2020

Both on master and release-branch.go1.13, there is a comment in query_test.go:

// e0cf3de987e6 is the latest commit on the master branch, and it's actually
// v1.19.10-pre1, not anything resembling v3: attempting to query it as such
// should fail.
{path: queryRepoV3, query: "e0cf3de987e6", err: `vcs-test.golang.org/git/querytest.git/v3@v3.0.0-20180704024501-e0cf3de987e6: invalid version: go.mod has non-.../v3 module path "vcs-test.golang.org/git/querytest.git" (and .../v3/go.mod does not exist) at revision e0cf3de987e6`},
{path: queryRepoV3, query: "latest", err: `no matching versions for query "latest"`},

It says that "e0cf3de987e6 is the latest commit on the master branch". This is no longer true, there are now three newer commits on master branch of https://vcs-test.golang.org/git/querytest repo:

querytest $ git log --oneline origin/master
ed5ffda (HEAD -> master, origin/master, origin/HEAD) after v1.9.10-pre2+metadata
42abcb6 (tag: v1.9.10-pre2+metadata) at v1.9.10-pre2+metadata
66f8cbe before v1.9.10-pre2+metadata
e0cf3de (tag: v1.9.10-pre1) at v1.9.10-pre1

Other than the comment being wrong, this is harmless and the tests are still passing on master and release-branch.go1.13.

However, release-branch.go1.12 does not have CL 186237 applied:

{path: queryRepoV3, query: "latest", vers: "v3.0.0-20180704024501-e0cf3de987e6"},

Which is causing the TestQuery test to fail on release-branch.go1.12:


$ go test cmd/go/internal/modload
go: finding golang.org/x/net/context latest
go: finding golang.org/x/net latest
go: downloading golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553
go: extracting golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553
go: finding golang.org/x/text v0.3.2
go: downloading golang.org/x/text v0.3.2
go: extracting golang.org/x/text v0.3.2
go: finding github.com/rsc/quote/buggy latest
go: finding github.com/rsc/quote v1.5.2
go: downloading github.com/rsc/quote v1.5.2
go: extracting github.com/rsc/quote v1.5.2
go: finding vcs-test.golang.org/git/querytest.git v0.0.0-pre1
go: finding vcs-test.golang.org/git/querytest.git v0.0.0
go: finding vcs-test.golang.org/git/querytest.git v0.0.1
go: finding vcs-test.golang.org/git/querytest.git v0.0.99
go: finding vcs-test.golang.org/git/querytest.git v0.3.0
go: finding vcs-test.golang.org/git/querytest.git v0.1.2
go: finding vcs-test.golang.org/git/querytest.git v0.0.3
go: finding vcs-test.golang.org/git/querytest.git v1.9.9
go: finding vcs-test.golang.org/git/querytest.git latest
go: finding vcs-test.golang.org/git/querytest.git v1.9.10-pre1
go: finding vcs-test.golang.org/git/querytest.git 6cf84eb
go: finding vcs-test.golang.org/git/querytest.git start
go: finding vcs-test.golang.org/git/querytest.git 7a1b6bf
go: finding vcs-test.golang.org/git/querytest.git/v2 v2.0.0
go: finding vcs-test.golang.org/git/querytest.git/v2 v0.0.1
go: finding vcs-test.golang.org/git/querytest.git/v2 v2.5.5
go: finding vcs-test.golang.org/git/querytest.git/v3 latest
go: finding vcs-test.golang.org/git/emptytest.git latest
--- FAIL: TestQuery (5.70s)
    --- FAIL: TestQuery/vcs-test.golang.org_git_querytest.git_v3/latest/* (0.17s)
        query_test.go:153: Query("vcs-test.golang.org/git/querytest.git/v3", "latest", *) = v3.0.0-20191220134614-ed5ffdaa1f5e, want v3.0.0-20180704024501-e0cf3de987e6
FAIL
FAIL	cmd/go/internal/modload	14.080s

We should fix this to help with #29252.

/cc @bcmills @jayconrod @matloob @cagedmantis @toothrot

@gopherbot

This comment has been minimized.

Copy link

@gopherbot gopherbot commented Jan 10, 2020

Change https://golang.org/cl/214281 mentions this issue: [release-branch.go1.12] cmd/go/internal/modload: remove erroneous test case

@gopherbot

This comment has been minimized.

Copy link

@gopherbot gopherbot commented Jan 10, 2020

Change https://golang.org/cl/214282 mentions this issue: cmd/go/internal/modload: fix an erroneous comment about the test repo

@bcmills bcmills self-assigned this Jan 10, 2020
gopherbot pushed a commit that referenced this issue Jan 10, 2020
Updates #36489

Change-Id: I1ca215ba0a64a31d662134385b8be46bb4ba4434
Reviewed-on: https://go-review.googlesource.com/c/go/+/214282
Run-TryBot: Bryan C. Mills <bcmills@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
Reviewed-by: Jay Conrod <jayconrod@google.com>
@bcmills bcmills closed this Jan 10, 2020
gopherbot pushed a commit that referenced this issue Jan 10, 2020
…t case

Commit e0cf3de987e6 of the vcs-test.golang.org/git/querytest repo
includes a go.mod file specifying path vcs-test.golang.org/git/querytest.git,
as does the latest commit. Since the repository also lacks v3 tags,
a query for "latest" with a v3 path should fail.

Due to a bug, that query does not fail as expected with Go 1.12.
However, we do not need to continue to test for buggy behavior that
was fixed in a subsequent release.

Updates #36489

Change-Id: I766390c962fc75ba98fad02831310d90abf3055f
Reviewed-on: https://go-review.googlesource.com/c/go/+/214281
Run-TryBot: Bryan C. Mills <bcmills@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.