Skip to content

proxy.golang.org: missing package #32542

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

Closed
gobins opened this issue Jun 11, 2019 · 7 comments
Closed

proxy.golang.org: missing package #32542

gobins opened this issue Jun 11, 2019 · 7 comments
Labels
FrozenDueToAge NeedsFix The path to resolution is known, but the work has not been done.
Milestone

Comments

@gobins
Copy link

gobins commented Jun 11, 2019

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

go version go1.12.5 linux/amd64

Does this issue reproduce with the latest release?

I have not checked yet.

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

GOARCH="amd64"
GOBIN=""
GOCACHE="/home/gobins/.cache/go-build"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/home/gobins/go"
GOPROXY="https://proxy.golang.org"
GORACE=""
GOROOT="/usr/local/go"
GOTMPDIR=""
GOTOOLDIR="/usr/local/go/pkg/tool/linux_amd64"
GCCGO="gccgo"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
GOMOD="/home/gobins/git/capacitor/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-build022726128=/tmp/go-build -gno-record-gcc-switches"

What did you do?

go clean --modcache
go build

What did you expect to see?

Clean build with no errors

What did you see instead?

go: dmitri.shuralyov.com/service/[email protected]: unexpected status (https://proxy.golang.org/dmitri.shuralyov.com/service/change/@v/v0.0.0-20181023043359-a85b471d5412.info): 410 Gone
go: dmitri.shuralyov.com/app/[email protected]: unexpected status (https://proxy.golang.org/dmitri.shuralyov.com/app/changes/@v/v0.0.0-20180602232624-0a106ad413e3.info): 410 Gone

The build works without setting the GOPROXY to https://proxy.golang.org

@gobins gobins changed the title proxy.golang.org: proxy.golang.org: missing package Jun 11, 2019
@heschi
Copy link
Contributor

heschi commented Jun 11, 2019

Thanks for the report. CC @dmitshur.

It looks like the module proxy referenced by https://dmitri.shuralyov.com/service/change?go-get=1, https://dmitri.shuralyov.com/api/module, doesn't support looking up versions by hash -- https://dmitri.shuralyov.com/api/module/dmitri.shuralyov.com/service/change/@v/a85b471d5412.info returns 404. proxy.golang.org recently changed to require those kinds of lookups in some cases.

Sorry for the trouble. It'll probably take a bit to figure out what to do about this but we'll get it fixed as soon as we can.

@heschi heschi self-assigned this Jun 11, 2019
@heschi heschi added the NeedsFix The path to resolution is known, but the work has not been done. label Jun 11, 2019
@heschi heschi added this to the Unreleased milestone Jun 11, 2019
@dmitshur
Copy link
Contributor

dmitshur commented Jun 11, 2019

It looks like the module proxy referenced by https://dmitri.shuralyov.com/service/change?go-get=1, https://dmitri.shuralyov.com/api/module, doesn't support looking up versions by hash

This is true. My understanding is that it's a valid thing for a server speaking the module proxy protocol to do, is that right? I based that on https://golang.org/cmd/go/#hdr-Module_proxy_protocol:

A Go module proxy is any web server that can respond to GET requests for URLs of a specified form. The requests have no query parameters, so even a site serving from a fixed file system (including a file:/// URL) can be a module proxy.

A site serving from a fixed file system cannot be expected to respond to arbitrary lookups of versions by hash (since hashes can be specified with various lengths, the full 40 characters or shorter).

dmitshur added a commit to shurcooL/home that referenced this issue Jun 12, 2019
Add support for 12-character lower-case git hash module queries.
This is a temporary workaround for golang.org/issue/32542; my intention
is to take it out when the upstream issue is resolved. /cc @heschik

Updates golang/go#32542
@dmitshur
Copy link
Contributor

dmitshur commented Jun 12, 2019

I've temporarily modified the module server on my website to respond to a limited subset of module queries, in commit shurcooL/home@c1141c0. That change makes the current proxy.golang.org work as expected on dmitri.shuralyov.com/... modules, so this issue (and #32551) should not be occurring anymore (e.g., https://proxy.golang.org/dmitri.shuralyov.com/service/change/@v/v0.0.0-20181023043359-a85b471d5412.info now returns 200 OK).

Once proxy.golang.org is updated to fully resolve this issue, I plan to remove that workaround. Hopefully this helps reduce any disruption in the meantime.


For anyone interested in being able to reproduce this issue, I've created a new test module with a single pseudo-version. Its module path is dmitri.shuralyov.com/test/modtest3:

https://dmitri.shuralyov.com/test/moduleproxy/dmitri.shuralyov.com/test/modtest3/@v/ - the static file system-based module server providing the modtest3 module

https://proxy.golang.org/dmitri.shuralyov.com/test/modtest3/@v/v0.0.0-20181023043359-a85b471d5412.info - returns 410 Gone "not found: " right now, but it should be 200 OK once this issue is fully resolved

@heschi
Copy link
Contributor

heschi commented Jun 13, 2019

The fix is rolled out to proxy.golang.org and Dmitri's test link is working. Thanks for your help and patience.

@heschi heschi closed this as completed Jun 13, 2019
@dmitshur
Copy link
Contributor

dmitshur commented Jun 13, 2019

Thanks!

I plan to remove the temporary workaround from my site tonight, and will test that it continues to work afterwards. Edit: This is done now. I'm not seeing any problems. Please let me know if you do spot a problem.

@gobins
Copy link
Author

gobins commented Jun 16, 2019

Thanks for the quick response guys!

@golang golang locked and limited conversation to collaborators Jun 15, 2020
@rsc rsc unassigned heschi Jun 23, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge NeedsFix The path to resolution is known, but the work has not been done.
Projects
None yet
Development

No branches or pull requests

5 participants