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/gopkg.in_natefinch_lumberjack.v2/latest failing #58445

Closed
prattmic opened this issue Feb 9, 2023 · 10 comments
Assignees
Labels
GoCommand cmd/go modules NeedsFix The path to resolution is known, but the work has not been done. Testing An issue that has been verified to require only test changes, not just a test failure.
Milestone

Comments

@prattmic
Copy link
Member

prattmic commented Feb 9, 2023

#!watchflakes
post <- pkg == "cmd/go/internal/modfetch" && log ~ `lumberjack\.v2` && date < "2023-03-01"

Failed on https://go.dev/cl/466858.

https://storage.googleapis.com/go-build-log/a1d4a977/linux-amd64-longtest_5b4a2f7a.log

--- FAIL: TestCodeRepo (0.00s)
    --- FAIL: TestCodeRepo/gopkg.in_natefinch_lumberjack.v2/latest (6.74s)
        coderepo_test.go:609: info.Version = "v2.2.1", want "v2.0.0-20170531160350-a96e63847dc3"
        coderepo_test.go:612: info.Name = "4cb27fcfbb0f35cb48c542c5ea80b7c1d18933d0", want "a96e63847dc3c67d17befa69c303767e2f84e54f"
        coderepo_test.go:615: info.Short = "4cb27fcfbb0f", want "a96e63847dc3"
        coderepo_test.go:618: info.Time = 2023-02-06 19:38:14 +0000 UTC, want 2017-05-31 16:03:50 +0000 UTC
--- FAIL: TestCodeRepoVersions (0.21s)
    --- FAIL: TestCodeRepoVersions/parallel (0.00s)
        --- FAIL: TestCodeRepoVersions/parallel/gopkg.in_natefinch_lumberjack.v2 (0.00s)
            coderepo_test.go:827: Versions(""):
                have &{0xc000159400 [v2.0.0 v2.2.0 v2.2.1]}
                want [v2.0.0]
FAIL
FAIL	cmd/go/internal/modfetch	34.757s
FAIL

It sounds like this test depends on lumberjack being an abandoned project? But it just tagged a new version: https://pkg.go.dev/gopkg.in/natefinch/lumberjack.v2?tab=versions

cc @bcmills

@dr2chase
Copy link
Contributor

dr2chase commented Feb 9, 2023

I think this might instead be linked to gopkg.in flakiness?
https://go.dev/cl/466857 seemed to fix the problem.

@dr2chase dr2chase added the NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. label Feb 9, 2023
@prattmic
Copy link
Member Author

prattmic commented Feb 9, 2023

I believe that https://go.dev/cl/466857 "fixes" this given that it skips this test, but I don't think this is flakiness. This test asserts that gopkg.in/natefinch/lumberjack.v2@latest is v2.0.0, but it simply isn't anymore:

$ go get gopkg.in/natefinch/lumberjack.v2@latest
go: downloading gopkg.in/natefinch/lumberjack.v2 v2.2.1
go: added gopkg.in/natefinch/lumberjack.v2 v2.2.1

@bcmills
Copy link
Contributor

bcmills commented Feb 9, 2023

Let's remove those test cases. If/when we move the gopkg.in tests to the hermetic test-local server (#54503), we can re-enable them without external dependencies at that point.

@bcmills bcmills added Testing An issue that has been verified to require only test changes, not just a test failure. NeedsFix The path to resolution is known, but the work has not been done. modules labels Feb 9, 2023
@bcmills bcmills added this to the Go1.21 milestone Feb 9, 2023
@gopherbot gopherbot removed the NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. label Feb 9, 2023
@bcmills bcmills self-assigned this Feb 9, 2023
@bcmills
Copy link
Contributor

bcmills commented Feb 9, 2023

@gopherbot, please backport to Go 1.20 and 1.19. These tests are broken due to benign external changes.

@bcmills bcmills added the GoCommand cmd/go label Feb 9, 2023
@gopherbot
Copy link
Contributor

Change https://go.dev/cl/466860 mentions this issue: cmd/go: remove tests that assume lack of new versions of external modules

@gopherbot
Copy link
Contributor

Backport issue(s) opened: #58449 (for 1.19), #58450 (for 1.20).

Remember to create the cherry-pick CL(s) as soon as the patch is submitted to master, according to https://go.dev/wiki/MinorReleases.

@gopherbot
Copy link
Contributor

Change https://go.dev/cl/466861 mentions this issue: [release-branch.go1.20] cmd/go: remove tests that assume lack of new versions of external modules

@gopherbot
Copy link
Contributor

Change https://go.dev/cl/466862 mentions this issue: [release-branch.go1.19] cmd/go: remove tests that assume lack of new versions of external modules

@gopherbot
Copy link
Contributor

Found new dashboard test flakes for:

#!watchflakes
post <- pkg == "cmd/go/internal/modfetch" && `lumberjack\.v2`
2023-01-30 17:13 linux-386-longtest go@01a5a83c cmd/go/internal/modfetch.TestCodeRepo (log)
--- FAIL: TestCodeRepo (0.00s)
    --- FAIL: TestCodeRepo/gopkg.in_natefinch_lumberjack.v2/latest (3.17s)
        coderepo_test.go:603: repo.Stat("latest"): gopkg.in/natefinch/[email protected]: invalid version: go.mod has non-....v2 module path "github.com/natefinch/lumberjack" at revision v2.2.0
2023-01-30 17:13 linux-amd64-longtest go@01a5a83c cmd/go/internal/modfetch.TestCodeRepo (log)
--- FAIL: TestCodeRepo (0.00s)
    --- FAIL: TestCodeRepo/gopkg.in_natefinch_lumberjack.v2/latest (3.71s)
        coderepo_test.go:603: repo.Stat("latest"): gopkg.in/natefinch/[email protected]: invalid version: go.mod has non-....v2 module path "github.com/natefinch/lumberjack" at revision v2.2.0
2023-01-30 17:13 linux-amd64-longtest-race go@01a5a83c cmd/go/internal/modfetch.TestCodeRepo (log)
--- FAIL: TestCodeRepo (0.00s)
    --- FAIL: TestCodeRepo/gopkg.in_natefinch_lumberjack.v2/latest (4.04s)
        coderepo_test.go:603: repo.Stat("latest"): gopkg.in/natefinch/[email protected]: invalid version: go.mod has non-....v2 module path "github.com/natefinch/lumberjack" at revision v2.2.0
2023-02-09 18:52 linux-386-longtest go@b7880cf6 cmd/go/internal/modfetch.TestCodeRepo (log)
--- FAIL: TestCodeRepo (0.00s)
    --- FAIL: TestCodeRepo/gopkg.in_natefinch_lumberjack.v2/latest (7.20s)
        coderepo_test.go:609: info.Version = "v2.2.1", want "v2.0.0-20170531160350-a96e63847dc3"
        coderepo_test.go:612: info.Name = "4cb27fcfbb0f35cb48c542c5ea80b7c1d18933d0", want "a96e63847dc3c67d17befa69c303767e2f84e54f"
        coderepo_test.go:615: info.Short = "4cb27fcfbb0f", want "a96e63847dc3"
        coderepo_test.go:618: info.Time = 2023-02-06 19:38:14 +0000 UTC, want 2017-05-31 16:03:50 +0000 UTC
2023-02-09 18:52 linux-amd64-longtest go@b7880cf6 cmd/go/internal/modfetch.TestCodeRepo (log)
--- FAIL: TestCodeRepo (0.00s)
    --- FAIL: TestCodeRepo/gopkg.in_natefinch_lumberjack.v2/latest (6.51s)
        coderepo_test.go:609: info.Version = "v2.2.1", want "v2.0.0-20170531160350-a96e63847dc3"
        coderepo_test.go:612: info.Name = "4cb27fcfbb0f35cb48c542c5ea80b7c1d18933d0", want "a96e63847dc3c67d17befa69c303767e2f84e54f"
        coderepo_test.go:615: info.Short = "4cb27fcfbb0f", want "a96e63847dc3"
        coderepo_test.go:618: info.Time = 2023-02-06 19:38:14 +0000 UTC, want 2017-05-31 16:03:50 +0000 UTC
2023-02-09 18:52 linux-amd64-longtest-race go@b7880cf6 cmd/go/internal/modfetch.TestCodeRepo (log)
--- FAIL: TestCodeRepo (0.00s)
    --- FAIL: TestCodeRepo/gopkg.in_natefinch_lumberjack.v2/latest (7.03s)
        coderepo_test.go:609: info.Version = "v2.2.1", want "v2.0.0-20170531160350-a96e63847dc3"
        coderepo_test.go:612: info.Name = "4cb27fcfbb0f35cb48c542c5ea80b7c1d18933d0", want "a96e63847dc3c67d17befa69c303767e2f84e54f"
        coderepo_test.go:615: info.Short = "4cb27fcfbb0f", want "a96e63847dc3"
        coderepo_test.go:618: info.Time = 2023-02-06 19:38:14 +0000 UTC, want 2017-05-31 16:03:50 +0000 UTC

watchflakes

gopherbot pushed a commit that referenced this issue Feb 10, 2023
…versions of external modules

In general it seems ok to assume that an open-source module that did
exist will continue to do so — after all, users of open-source modules
already do that all the time. However, we should not assume that those
modules do not publish new versions — that's really up to their
maintainers to decide.

Two existing tests did make that assumption for the module
gopkg.in/natefinch/lumberjack.v2. Let's remove those two tests.
If we need to replace them at some point, we can replace them with
hermetic test-only modules (#54503) or perhaps modules owned by the Go
project.

Updates #58445.
Fixes #58449.

Change-Id: Ica8fe587d86fc41f3d8445a4cd2b8820455ae45f
Reviewed-on: https://go-review.googlesource.com/c/go/+/466862
Reviewed-by: David Chase <[email protected]>
Run-TryBot: Bryan Mills <[email protected]>
TryBot-Result: Gopher Robot <[email protected]>
gopherbot pushed a commit that referenced this issue Feb 10, 2023
…versions of external modules

In general it seems ok to assume that an open-source module that did
exist will continue to do so — after all, users of open-source modules
already do that all the time. However, we should not assume that those
modules do not publish new versions — that's really up to their
maintainers to decide.

Two existing tests did make that assumption for the module
gopkg.in/natefinch/lumberjack.v2. Let's remove those two tests.
If we need to replace them at some point, we can replace them with
hermetic test-only modules (#54503) or perhaps modules owned by the Go
project.

Updates #58445.
Fixes #58450.

Change-Id: Ica8fe587d86fc41f3d8445a4cd2b8820455ae45f
Reviewed-on: https://go-review.googlesource.com/c/go/+/466861
TryBot-Result: Gopher Robot <[email protected]>
Run-TryBot: Bryan Mills <[email protected]>
Reviewed-by: David Chase <[email protected]>
johanbrandhorst pushed a commit to Pryz/go that referenced this issue Feb 12, 2023
…ules

In general it seems ok to assume that an open-source module that did
exist will continue to do so — after all, users of open-source modules
already do that all the time. However, we should not assume that those
modules do not publish new versions — that's really up to their
maintainers to decide.

Two existing tests did make that assumption for the module
gopkg.in/natefinch/lumberjack.v2. Let's remove those two tests.
If we need to replace them at some point, we can replace them with
hermetic test-only modules (golang#54503) or perhaps modules owned by the Go
project.

Fixes golang#58445.

Change-Id: Ica8fe587d86fc41f3d8445a4cd2b8820455ae45f
Reviewed-on: https://go-review.googlesource.com/c/go/+/466860
Run-TryBot: Bryan Mills <[email protected]>
TryBot-Result: Gopher Robot <[email protected]>
Auto-Submit: Bryan Mills <[email protected]>
Reviewed-by: David Chase <[email protected]>
romaindoumenc pushed a commit to TroutSoftware/go that referenced this issue Feb 14, 2023
…versions of external modules

In general it seems ok to assume that an open-source module that did
exist will continue to do so — after all, users of open-source modules
already do that all the time. However, we should not assume that those
modules do not publish new versions — that's really up to their
maintainers to decide.

Two existing tests did make that assumption for the module
gopkg.in/natefinch/lumberjack.v2. Let's remove those two tests.
If we need to replace them at some point, we can replace them with
hermetic test-only modules (golang#54503) or perhaps modules owned by the Go
project.

Updates golang#58445.
Fixes golang#58450.

Change-Id: Ica8fe587d86fc41f3d8445a4cd2b8820455ae45f
Reviewed-on: https://go-review.googlesource.com/c/go/+/466861
TryBot-Result: Gopher Robot <[email protected]>
Run-TryBot: Bryan Mills <[email protected]>
Reviewed-by: David Chase <[email protected]>
@gopherbot
Copy link
Contributor

Found new dashboard test flakes for:

#!watchflakes
post <- pkg == "cmd/go/internal/modfetch" && log ~ `lumberjack\.v2`
2024-01-09 01:36 gotip-linux-386-longtest go@b7c630dc cmd/go/internal/modfetch.TestCodeRepo/github.com_rsc_quote_buggy/c4d4236f (log)
=== RUN   TestCodeRepo/github.com_rsc_quote_buggy/c4d4236f
=== PAUSE TestCodeRepo/github.com_rsc_quote_buggy/c4d4236f
=== CONT  TestCodeRepo/github.com_rsc_quote_buggy/c4d4236f
    coderepo_test.go:619: repoStat("c4d4236f"): github.com/rsc/quote/buggy@c4d4236f: invalid version: git ls-remote -q origin in /home/swarming/.swarming/w/ir/x/t/gitrepo-test-3944638613/modcache/cache/vcs/5673a25ea375597bb7799aed271d658fc11bcb2aced1a8a5011c001d4c2ead3a: exit status 128:
        	fatal: unable to access 'https://github.com/rsc/quote/': Could not resolve host: github.com, wanted "missing github.com/rsc/quote/buggy/go.mod at revision c4d4236f9242"
--- FAIL: TestCodeRepo/github.com_rsc_quote_buggy/c4d4236f (0.01s)
2024-01-09 01:36 gotip-linux-386-longtest go@b7c630dc cmd/go/internal/modfetch.TestCodeRepo/rsc.io_quote/v1.0.0 (log)
=== RUN   TestCodeRepo/rsc.io_quote/v1.0.0
=== PAUSE TestCodeRepo/rsc.io_quote/v1.0.0
=== CONT  TestCodeRepo/rsc.io_quote/v1.0.0
    coderepo_test.go:623: repo.Stat("v1.0.0"): rsc.io/[email protected]: invalid version: git ls-remote -q origin in /home/swarming/.swarming/w/ir/x/t/gitrepo-test-3944638613/modcache/cache/vcs/5673a25ea375597bb7799aed271d658fc11bcb2aced1a8a5011c001d4c2ead3a: exit status 128:
        	fatal: unable to access 'https://github.com/rsc/quote/': Could not resolve host: github.com
--- FAIL: TestCodeRepo/rsc.io_quote/v1.0.0 (0.81s)

watchflakes

@gopherbot gopherbot reopened this Jan 19, 2024
@bcmills bcmills closed this as completed Jan 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
GoCommand cmd/go modules NeedsFix The path to resolution is known, but the work has not been done. Testing An issue that has been verified to require only test changes, not just a test failure.
Projects
Archived in project
Development

No branches or pull requests

4 participants