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

proxy.golang.org: problem with some modules related to golang.org/x/ #33513

Closed
ldez opened this issue Aug 7, 2019 · 8 comments
Closed

proxy.golang.org: problem with some modules related to golang.org/x/ #33513

ldez opened this issue Aug 7, 2019 · 8 comments

Comments

@ldez
Copy link

ldez commented Aug 7, 2019

What version of Go are you using (go version)?

$ go version
go version go1.12.7 linux/amd64

Does this issue reproduce with the latest release?

yes with go1.12 latest

What operating system and processor architecture are you using (go env)?

go env Output
$ go env
GOARCH="amd64"
GOBIN=""
GOCACHE="/home/ldez/.cache/go-build"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/home/ldez/sources/go"
GOPROXY=""
GORACE=""
GOROOT="/home/ldez/.gvm/gos/go1.12.7"
GOTMPDIR=""
GOTOOLDIR="/home/ldez/.gvm/gos/go1.12.7/pkg/tool/linux_amd64"
GCCGO="gccgo"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
GOMOD="/home/ldez/sources/go/src/github.com/go-acme/lego/go.mod"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build196235691=/tmp/go-build -gno-record-gcc-switches"

What did you do?

What did you expect to see?

No errors

What did you see instead?

golang.org/x/[email protected]: unexpected status (https://proxy.golang.org/golang.org/x/time/@v/v0.0.0-20190513212739-9d24e82272b4.zip): 410 Gone
golang.org/x/[email protected]: unexpected status (https://proxy.golang.org/golang.org/x/lint/@v/v0.0.0-20190511005446-959b441ac422.zip): 410 Gone

More information:

golang.org/x/time

golang.org/x/time v0.0.0-20190513212739-9d24e82272b4 h1:RMGusaKverhgGR5KBERIKiTyWoWHRd84GCtsNlvLvIo=
golang.org/x/time v0.0.0-20190513212739-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
golang.org/x/[email protected]: unexpected status (https://proxy.golang.org/golang.org/x/time/@v/v0.0.0-20190513212739-9d24e82272b4.zip): 410 Gone
matloob committed on Feb 15
1 parent 85acf8d commit 9d24e82272b4f38b78bc8cff74fa936d31ccd8ef
not found: golang.org/x/[email protected]: invalid pseudo-version: does not match version-control timestamp (2019-03-08T20:28:27Z)
{"Version":"v0.0.0-20190308202827-9d24e82272b4","Time":"2019-03-08T20:28:27Z"}

golang.org/x/lint

golang.org/x/lint v0.0.0-20190409202823-959b441ac422/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc=
golang.org/x/lint v0.0.0-20190511005446-959b441ac422/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc=
golang.org/x/[email protected]: unexpected status (https://proxy.golang.org/golang.org/x/lint/@v/v0.0.0-20190511005446-959b441ac422.zip): 410 Gone
not found: golang.org/x/[email protected]: invalid pseudo-version: does not match version-control timestamp (2019-04-09T20:28:23Z)
{"Version":"v0.0.0-20190409202823-959b441ac422","Time":"2019-04-09T20:28:23Z"}
@marwan-at-work
Copy link
Contributor

Same thing is happening with Gizmo, if you follow the same steps from above and run go mod tidy inside github.com/nytimes/gizmo you'll get the following error:

go: contrib.go.opencensus.io/exporter/[email protected] requires
	github.com/census-instrumentation/[email protected]: reading https://proxy.golang.org/github.com/census-instrumentation/opencensus-proto/@v/v0.1.0-0.20181214143942-ba49f56771b8.mod: 410 Gone

I think this is related to the Proxy updating to Go1.13 and invalidating manually written pseudo versions, quote from the tooling mailing list:

Go 1.13 includes some changes to the go command which tighten up the validation of module versions. Now that we have upgraded proxy.golang.org to use the 1.13beta1 version of the go command, we will be invalidating old module versions that are currently being served from proxy.golang.org but are no longer valid in 1.13

@marwan-at-work
Copy link
Contributor

Following up a little more, I can see that contrib.go.opencensus.io/exporter/[email protected] has what I guess an incorrect pseudo version, and updating from v0.4.6 to v0.6.0 does solve the problem (see linked pr above ^)

@marwan-at-work
Copy link
Contributor

@ldez I looked more into why your repo was failing:

go mod tidy on https://github.com/go-acme/lego

Shows the following error:

go: github.com/cloudflare/[email protected] requires
	golang.org/x/[email protected]: reading https://proxy.golang.org/golang.org/x/lint/@v/v0.0.0-20190511005446-959b441ac422.mod: 410 Gone

You require cloud-flare here: https://github.com/go-acme/lego/blob/master/go.mod#L18

The error means that cloudflare-go has an incorrectly written pseudo version AFAIK. Here's the link for that one:

https://github.com/cloudflare/cloudflare-go/blob/v0.9.4/go.mod#L10

Notice that if you run go mod tidy there, you'll get the same error which makes sense.

If you end up fixing the error inside cloudflare-go, then your build should succeed, I took the liberty of opening a PR there: cloudflare/cloudflare-go#333

@katiehockman
Copy link
Contributor

Yes, both of those versions for golang.org/x/lint and golang.org/x/time will now be invalid with 1.13 and will no longer be served from proxy.golang.org. This would have broken in direct-mode using 1.13 as well.

Try the suggestions that @marwan-at-work made, and I think that should solve the issues. Hopefully there aren't too many broken go.mod files in the wild, so once these get fixed, this problem shouldn't come up again. Thanks for reporting the issue.

@bcmills
Copy link
Contributor

bcmills commented Aug 7, 2019

Note that as a short-term workaround, you should be able to use a replace directive to target the corrected version. See https://tip.golang.org/doc/go1.13#version-validation.

@bcmills
Copy link
Contributor

bcmills commented Aug 7, 2019

Duplicate of #32805

@ldez
Copy link
Author

ldez commented Aug 7, 2019

Thanks ❤️

@nono
Copy link

nono commented Aug 20, 2019

Hopefully there aren't too many broken go.mod files in the wild, so once these get fixed, this problem shouldn't come up again.

For the record, renovate creates PR with the bad pseudo-version: renovatebot/renovate#4310. So, it may still come again.

@golang golang locked and limited conversation to collaborators Aug 19, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

6 participants