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: modules eagerly downloaded even with populated cache #36258

Open
frioux opened this issue Dec 23, 2019 · 2 comments
Open

cmd/go: modules eagerly downloaded even with populated cache #36258

frioux opened this issue Dec 23, 2019 · 2 comments

Comments

@frioux
Copy link

@frioux frioux commented Dec 23, 2019

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

$ go version
go version go1.14beta1 linux/amd64

Does this issue reproduce with the latest release?

Yes

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

go env Output
$ go env
GO111MODULE="on"
GOARCH="amd64"
GOBIN=""
GOCACHE="/home/frew/.cache/go-build"
GOENV="/home/frew/.config/go/env"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOINSECURE=""
GONOPROXY=""
GONOSUMDB=""
GOOS="linux"
GOPATH="/home/frew/go"
GOPRIVATE=""
GOPROXY="https://proxy.golang.org"
GOROOT="/home/frew/sdk/go1.14beta1"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/home/frew/sdk/go1.14beta1/pkg/tool/linux_amd64"
GCCGO="gccgo"
AR="ar"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
GOMOD="/home/frew/code/zr0/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=/run/shm/go-build397670914=/tmp/go-build -gno-record-gcc-switches"

What did you do?

Turned off my network and ran go test ./...

What did you expect to see?

My tests run.

What did you see instead?

Blocking and searching for modules:

$ go test ./...                                                                                
go: finding versions for github.com                                                            
go: finding versions for github.com/pierrec/lz4                        
go: finding versions for github.com/pierrec/lz4/internal                                       
go: finding versions for github.com/pierrec                                                    
go: finding versions for github.com/pierrec/lz4/internal/xxh32                 
^C

This is weird. It doesn't reproduce every time, but I notice it a lot more now while I'm outside of Los Angeles, visiting family in TX where the internet is worse. To be clear: I already have a populated go module cache, so I should only need to download modules when I update my go.mod, which is pretty rare. I don't think this is new with 1.14, I just think it's related to the worse internet over the holidays.

@smasher164 smasher164 changed the title Go seems to eagerly download modules even when it doesn't need to cmd/go: modules eagerly downloaded even with populated cache Dec 25, 2019
@bcmills

This comment has been minimized.

Copy link
Member

@bcmills bcmills commented Jan 7, 2020

What happens if you let go test ./... keep running? (Do you get an error?)
Does the command succeed with the network on?

At first blush, this looks like an instance of #26152.

@frioux

This comment has been minimized.

Copy link
Author

@frioux frioux commented Jan 14, 2020

It's pretty hard to reproduce this without flaky internet (just turning the wifi off doesn't surface the issue.) I'll keep an eye out for if it shows up in the meantime, I guess?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.