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

x/tools/cmd/getgo: uses incorrect "latest" url #42676

Closed
fmpwizard opened this issue Nov 17, 2020 · 6 comments
Closed

x/tools/cmd/getgo: uses incorrect "latest" url #42676

fmpwizard opened this issue Nov 17, 2020 · 6 comments
Labels
FrozenDueToAge NeedsFix The path to resolution is known, but the work has not been done. Tools This label describes issues relating to any tools in the x/tools repository.
Milestone

Comments

@fmpwizard
Copy link

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

$ go version
1.5.55

But the golang/tools commit that has this problem is the latest as of today 2020/11/17

9036a0f9af11674fea137b794a0a2e6aef6882e1

Does this issue reproduce with the latest release?

Yes

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

Not relevant but:

go env Output
$ go env
GO111MODULE=""
GOARCH="amd64"
GOBIN=""
GOCACHE="/home/wizard/.cache/go-build"
GOENV="/home/wizard/.config/go/env"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOINSECURE=""
GOMODCACHE="/mnt/extra/gopath/pkg/mod"
GONOPROXY="github.com/tradellama"
GONOSUMDB="github.com/tradellama"
GOOS="linux"
GOPATH="/mnt/extra/gopath"
GOPRIVATE="github.com/tradellama"
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/usr/local/go"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/usr/local/go/pkg/tool/linux_amd64"
GCCGO="gccgo"
AR="ar"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
GOMOD="/mnt/extra/code/work/tradellama/goat/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-build370880754=/tmp/go-build -gno-record-gcc-switches"

What did you do?

  1. curl -LO https://get.golang.org/$(uname)/go_installer && chmod +x go_installer && ./go_installer -i
  2. Got:

Welcome to the Go installer!
Would you like to install Go? Y/n [Y]: y
The latest go version is go1.15.4, install that? Y/n [Y]:

What did you expect to see?

go1.15.5 being offered

What did you see instead?

go.1.15.4

Possible fix:

this line

https://github.com/golang/tools/blob/master/cmd/getgo/download.go#L24

gets the version that the golang.org site "runs" but at this this time, the site doesn't run the latest. We should instead use:

https://golang.org/dl/?mode=json

Which was suggested on the mailing list
https://groups.google.com/g/golang-nuts/c/kweFo4TE4N0/m/XyH-tI0OBQAJ

@gopherbot gopherbot added the Tools This label describes issues relating to any tools in the x/tools repository. label Nov 17, 2020
@gopherbot gopherbot added this to the Unreleased milestone Nov 17, 2020
@gopherbot
Copy link

Change https://golang.org/cl/270878 mentions this issue: x/tools/getgo: get current version from correct url

@dmitshur dmitshur changed the title x/tools/getgo uses incorrect "latest" url x/tools/getgo: uses incorrect "latest" url Nov 30, 2020
@dmitshur
Copy link
Contributor

CC @golang/release.

@dmitshur dmitshur added the NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. label Nov 30, 2020
@dmitshur
Copy link
Contributor

I agree that switching it to use the https://golang.org/dl/?mode=json API endpoint is the right fix.

@dmitshur dmitshur added NeedsFix The path to resolution is known, but the work has not been done. and removed NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. labels Nov 30, 2020
@dmitshur dmitshur changed the title x/tools/getgo: uses incorrect "latest" url x/tools/cmd/getgo: uses incorrect "latest" url Nov 30, 2020
@dmitshur dmitshur added this to Planned in Go Release Team Feb 25, 2021
@dmitshur
Copy link
Contributor

@fmpwizard CL 270878 has some outstanding review comments, once addressed it should be good to submit. Are you able to take a look?

@fmpwizard
Copy link
Author

Hi @dmitshur yes, I'll take care of the comments, it may be a few more days but I'm still planning on addressing them.
Thank you!

@dmitshur
Copy link
Contributor

That sounds good, thank you!

Go Release Team automation moved this from Planned to Done Jun 7, 2021
@golang golang locked and limited conversation to collaborators Jun 7, 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. Tools This label describes issues relating to any tools in the x/tools repository.
Projects
Archived in project
Development

No branches or pull requests

3 participants