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: TestCodeRepo failures due to external repo changes #28856

Open
ALTree opened this issue Nov 18, 2018 · 19 comments
Open

cmd/go/internal/modfetch: TestCodeRepo failures due to external repo changes #28856

ALTree opened this issue Nov 18, 2018 · 19 comments
Assignees
Milestone

Comments

@ALTree
Copy link
Member

@ALTree ALTree commented Nov 18, 2018

$ gotip version
go version devel +fe562cebf1 Sun Nov 18 16:13:13 2018 +0000 linux/amd64

To reproduce:

$ cd src/cmd/go/internal/modfetch

$ gotip test -run=TestCodeRepo
--- FAIL: TestCodeRepo (58.16s)
    --- FAIL: TestCodeRepo/gopkg.in_yaml.v2/v2 (3.32s)
        coderepo_test.go:368: info.Version = "v2.2.2-0.20181115110504-51d6538a90f8", want "v2.2.1"
        coderepo_test.go:371: info.Name = "51d6538a90f86fe93ac480b35f37b2be17fef232", want "5420a8b6744d3b0345ab293f6fcba19c978f1183"
        coderepo_test.go:374: info.Short = "51d6538a90f8", want "5420a8b6744d"
        coderepo_test.go:377: info.Time = 2018-11-15 11:05:04 +0000 UTC, want 2018-03-28 19:50:20 +0000 UTC
FAIL
exit status 1
FAIL	cmd/go/internal/modfetch	60.812s

Spotted on the longtest builder.

@ALTree ALTree added this to the Go1.12 milestone Nov 18, 2018
@josharian

This comment has been minimized.

Copy link
Contributor

@josharian josharian commented Nov 18, 2018

Looks like what happened is that github.com/go-yaml/yaml added a new comment to the v2 branch: https://github.com/go-yaml/yaml/commits/v2. (Observe that previous tip was
go-yaml/yaml@5420a8b, and that new tip is
go-yaml/yaml@51d6538, which correspond to the want/have commits in the test failure.)

cc @bcmills

@andybons

This comment has been minimized.

Copy link
Member

@andybons andybons commented Nov 26, 2018

Why are we running tests against repos that are active and not controlled by us? Seems that we should be hitting repos that we control and are pre-baked.

@bradfitz

@andybons andybons changed the title cmd/go: internal/modfetch TestCodeRepo failure cmd/go/internal/modfetch: TestCodeRepo failures due to external repo changes Nov 26, 2018
@andybons

This comment has been minimized.

Copy link
Member

@andybons andybons commented Nov 26, 2018

Adding @rsc since he wrote the original code.

@dmitshur

This comment has been minimized.

Copy link
Member

@dmitshur dmitshur commented Nov 26, 2018

Related issue #27692. It's another instance of the cmd/go tests relying on an external live repository.

@gopherbot

This comment has been minimized.

Copy link

@gopherbot 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

gopherbot pushed a commit that referenced this issue Dec 10, 2018
….2.2

I think we ought to make these tests hermetic, but in the meantime we
should at least make them pass.

Fixes #27692
Updates #28856

Change-Id: Ia78fa60e998dea3c871f640ffa2ece67b054f866
Reviewed-on: https://go-review.googlesource.com/c/153460
Run-TryBot: Bryan C. Mills <bcmills@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
@andybons andybons modified the milestones: Go1.12, Go1.13 Feb 12, 2019
@dmitshur

This comment has been minimized.

Copy link
Member

@dmitshur dmitshur commented Mar 6, 2019

@bcmills I think CL 153460 has resolved this issue fully, has it not? If not, what's left here?

@bcmills bcmills removed the Soon label Mar 7, 2019
@bcmills

This comment has been minimized.

Copy link
Member

@bcmills bcmills commented Mar 7, 2019

@dmitshur, ideally we should make the tests hermetic (for example, by running or emulating a local Git server and substituting paths to point to it).

@gopherbot

This comment has been minimized.

Copy link

@gopherbot gopherbot commented Mar 21, 2019

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

@ALTree

This comment has been minimized.

Copy link
Member Author

@ALTree ALTree commented Mar 21, 2019

Happened again, I sent the patch above to align the expected data for now, waiting for the test to become independent from external repositories.

gopherbot pushed a commit that referenced this issue Mar 21, 2019
New release, it broke again the longtest builder. Align the expected
data with the current release.

Making these tests independent of external repositories is #28856.

This fixes the longtest builder.

Updates #28856

Change-Id: I32d2f3325af828d26ab417a5e986e3aeefa1a897
Reviewed-on: https://go-review.googlesource.com/c/go/+/168561
Run-TryBot: Alberto Donizetti <alb.donizetti@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
@andybons andybons modified the milestones: Go1.13, Go1.14 Jul 8, 2019
@gopherbot

This comment has been minimized.

Copy link

@gopherbot gopherbot commented Oct 1, 2019

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

@andybons

This comment has been minimized.

Copy link
Member

@andybons andybons commented Oct 1, 2019

Happened again.

--- FAIL: TestCodeRepo (9.55s)
    --- FAIL: TestCodeRepo/parallel (0.00s)
        --- FAIL: TestCodeRepo/parallel/gopkg.in_yaml.v2/v2 (3.62s)
            coderepo_test.go:443: info.Version = "v2.2.3", want "v2.2.3-0.20190319135612-7b8349ac747c"
            coderepo_test.go:446: info.Name = "bb4e33bf68bf89cad44d386192cbed201f35b241", want "7b8349ac747c6a24702b762d2c4fd9266cf4f1d6"
            coderepo_test.go:449: info.Short = "bb4e33bf68bf", want "7b8349ac747c"
            coderepo_test.go:452: info.Time = 2019-09-30 19:09:21 +0000 UTC, want 2019-03-19 13:56:12 +0000 UTC

From https://build.golang.org/log/b73d1e539a95bac69fec321f90c305f4b69944fe

@dmitshur dmitshur assigned dmitshur and unassigned dmitshur Oct 1, 2019
gopherbot pushed a commit that referenced this issue Oct 1, 2019
The new yaml.v2 release broke the longtest builder. Update the expected
data.

Updates #28856

Change-Id: I98ec9e32e55bdb6b26b67e46dc16f34f77c2d40f
Reviewed-on: https://go-review.googlesource.com/c/go/+/198117
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
@gopherbot

This comment has been minimized.

Copy link

@gopherbot gopherbot commented Oct 3, 2019

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

@tklauser

This comment has been minimized.

Copy link
Member

@tklauser tklauser commented Oct 3, 2019

Happened again, see https://build.golang.org/log/8f1046f8a9e1125cfab4e50441e865afc7aafa72

--- FAIL: TestCodeRepo (10.52s)
    --- FAIL: TestCodeRepo/parallel (0.00s)
        --- FAIL: TestCodeRepo/parallel/gopkg.in_yaml.v2/v2 (3.46s)
            coderepo_test.go:443: info.Version = "v2.2.5-0.20191002202810-970885f01c8b", want "v2.2.3"
            coderepo_test.go:446: info.Name = "970885f01c8bc1fecb7ab1c8ce8e7609bda45530", want "bb4e33bf68bf89cad44d386192cbed201f35b241"
            coderepo_test.go:449: info.Short = "970885f01c8b", want "bb4e33bf68bf"
            coderepo_test.go:452: info.Time = 2019-10-02 20:28:10 +0000 UTC, want 2019-09-30 19:09:21 +0000 UTC

Sent https://golang.org/cl/198557

gopherbot pushed a commit that referenced this issue Oct 3, 2019
Update the expected data to fix the longtest builder.

Updates #28856

Change-Id: I7fb6ee72e8469d974561b4b4057f40142f5b3654
Reviewed-on: https://go-review.googlesource.com/c/go/+/198557
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
@gopherbot

This comment has been minimized.

Copy link

@gopherbot gopherbot commented Oct 3, 2019

Change https://golang.org/cl/198700 mentions this issue: [release-branch.go1.13] cmd/go/internal/modfetch: update TestCodeRepo for gopkg.in/yaml.v2 again

gopherbot pushed a commit that referenced this issue Oct 3, 2019
… for gopkg.in/yaml.v2 again

Update the expected data to fix the longtest builder.

Updates #28856

Change-Id: I7fb6ee72e8469d974561b4b4057f40142f5b3654
Reviewed-on: https://go-review.googlesource.com/c/go/+/198557
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
(cherry picked from commit 64785bf)
Reviewed-on: https://go-review.googlesource.com/c/go/+/198700
Run-TryBot: Bryan C. Mills <bcmills@google.com>
@gopherbot

This comment has been minimized.

Copy link

@gopherbot gopherbot commented Oct 9, 2019

Change https://golang.org/cl/200038 mentions this issue: [release-branch.go1.12] cmd/go/internal/modfetch: update TestCodeRepo for gopkg.in/yaml.v2 again

gopherbot pushed a commit that referenced this issue Oct 9, 2019
… for gopkg.in/yaml.v2 again

Update the expected data to fix the longtest builder.

Updates #28856

Change-Id: I7fb6ee72e8469d974561b4b4057f40142f5b3654
Reviewed-on: https://go-review.googlesource.com/c/go/+/198557
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
(cherry picked from commit 64785bf)
Reviewed-on: https://go-review.googlesource.com/c/go/+/198700
Run-TryBot: Bryan C. Mills <bcmills@google.com>
(cherry picked from commit 17a492f)
Reviewed-on: https://go-review.googlesource.com/c/go/+/200038
@rsc rsc modified the milestones: Go1.14, Backlog Oct 9, 2019
@ALTree

This comment has been minimized.

@ALTree ALTree added the Soon label Nov 5, 2019
@gopherbot

This comment has been minimized.

Copy link

@gopherbot gopherbot commented Nov 5, 2019

Change https://golang.org/cl/205437 mentions this issue: cmd/go/internal/modfetch: remove non-hermetic test

gopherbot pushed a commit that referenced this issue Nov 5, 2019
The test for gopkg.in/yaml.v2@v2 assumes that there are
no future upstream releases. That assumption empirically
does not hold. Backporting fixes to this test is annoying,
and other gopkg.in cases are already reasonably covered,
so remove the problematic test.

Updates #28856

Change-Id: I6455baa1816ac69e02d1ad5d03b82a93e1481a17
Reviewed-on: https://go-review.googlesource.com/c/go/+/205437
Run-TryBot: Bryan C. Mills <bcmills@google.com>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
@gopherbot

This comment has been minimized.

Copy link

@gopherbot gopherbot commented Nov 5, 2019

Change https://golang.org/cl/205439 mentions this issue: [release-branch.go1.12] cmd/go/internal/modfetch: remove non-hermetic test

@gopherbot

This comment has been minimized.

Copy link

@gopherbot gopherbot commented Nov 5, 2019

Change https://golang.org/cl/205438 mentions this issue: [release-branch.go1.13] cmd/go/internal/modfetch: remove non-hermetic test

gopherbot pushed a commit that referenced this issue Dec 11, 2019
… test

The test for gopkg.in/yaml.v2@v2 assumes that there are
no future upstream releases. That assumption empirically
does not hold. Backporting fixes to this test is annoying,
and other gopkg.in cases are already reasonably covered,
so remove the problematic test.

Updates #28856

Change-Id: I6455baa1816ac69e02d1ad5d03b82a93e1481a17
Reviewed-on: https://go-review.googlesource.com/c/go/+/205437
Run-TryBot: Bryan C. Mills <bcmills@google.com>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
(cherry picked from commit f0390ff)
Reviewed-on: https://go-review.googlesource.com/c/go/+/205438
Reviewed-by: Alexander Rakoczy <alex@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
gopherbot pushed a commit that referenced this issue Dec 11, 2019
… test

The test for gopkg.in/yaml.v2@v2 assumes that there are
no future upstream releases. That assumption empirically
does not hold. Backporting fixes to this test is annoying,
and other gopkg.in cases are already reasonably covered,
so remove the problematic test.

Updates #28856

Change-Id: I6455baa1816ac69e02d1ad5d03b82a93e1481a17
Reviewed-on: https://go-review.googlesource.com/c/go/+/205437
Run-TryBot: Bryan C. Mills <bcmills@google.com>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
(cherry picked from commit f0390ff)
Reviewed-on: https://go-review.googlesource.com/c/go/+/205439
Reviewed-by: Alexander Rakoczy <alex@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
8 participants
You can’t perform that action at this time.