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
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. 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 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/[email protected]: 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

@dmitshur dmitshur added Testing An issue that has been verified to require only test changes, not just a test failure. NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. GoCommand cmd/go modules labels Jan 10, 2020
@dmitshur dmitshur added this to the Backlog milestone Jan 10, 2020
@gopherbot
Copy link
Contributor

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

@gopherbot
Copy link
Contributor

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 <[email protected]>
TryBot-Result: Gobot Gobot <[email protected]>
Reviewed-by: Dmitri Shuralyov <[email protected]>
Reviewed-by: Jay Conrod <[email protected]>
@bcmills bcmills closed this as completed 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 <[email protected]>
TryBot-Result: Gobot Gobot <[email protected]>
Reviewed-by: Dmitri Shuralyov <[email protected]>
@golang golang locked and limited conversation to collaborators Jan 9, 2021
@rsc rsc unassigned bcmills Jun 23, 2022
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. 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

3 participants