Page MenuHomePhabricator

Toolforge: Update go runtime
Closed, DeclinedPublic

Description

Could toolforge offer a more modern version of the Go programming language? Currently it’s offering 1.7.4, which was released in 2016. It’s difficult to write code for such an ancient runtime, most libraries won’t work.

$ ssh login.toolforge.org
$ go version
go version go1.7.4 linux/amd64

Event Timeline

taavi subscribed.

The kubernetes cluster seems to have go 1.11, still fairly old considering 1.16 was released recently.

Golang will work just downloading a tarball, which makes it extremely easy to add to a container during the build instead of the deb packages. That would likely be better than having people put it in their NFS home directories.

I should also add that if you have a statically compiled binary (default in golang) that is compiled for Linux amd64, you don't need golang itself on Toolforge at all to run it there. This is only strictly useful if you are submitting build jobs.

The bastions are not a good place to run compiles anyway. They deliberately limit your cpu usage and ram to prevent taking over the environment. I don't, personally, recommend anybody using golang that old (1.7.4) at this point.

Phamhi triaged this task as Lowest priority.Mar 9 2021, 5:37 PM
nskaggs closed this task as Declined.EditedAug 19 2021, 8:49 PM
nskaggs subscribed.

I hope the explanations provided make sense. I'll note k8s cluster is running go version 1.15.9 now it seems. While not recommended to compile on bastions as bstorm mentioned, you can easily grab any tarball and use golang if needed. In light of this, I'm closing the ticket. I hope this helps, but feel free to reach out if you are still having trouble. Thanks!

#Grab the latest go binary 

wget https://golang.org/dl/go1.17.linux-amd64.tar.gz
tar -xzf go1.17.linux-amd64.tar.gz

#even add it to path

export PATH=$PATH:$PWD/go/bin

Might be a good candidate for extra docs? (as in "How to build your go code" kinda thing).