Project

General

Profile

Actions

Support #22610

open

Update everything to get Go version from go.mod

Added by Brett Smith about 1 month ago. Updated about 1 month ago.

Status:
New
Priority:
Normal
Assigned To:
-
Category:
CI
Target version:
-
Due date:
Story points:
-

Description

A bunch of tools determine what Go version to use with code like this:

build/run-build-packages-one-target.sh:    GOVERSION=$(grep 'const goversion =' $WORKSPACE/lib/install/deps.go |awk -F'"' '{print $2}')

Now that we put our Go version in go.mod, they should all be updated to use:

awk '($1 == "toolchain" && sub("^go", "", $2) == 1) { print $2; }' "$WORKSPACE/go.mod"

The current list of files to update, excluding deps.go itself, is:

$ git grep -lF -e /deps.go -e 'goversion ='
build/package-build-dockerfiles/Makefile
build/package-build-dockerfiles/build-all-build-containers.sh
build/run-build-packages-one-target.sh
services/workbench2/docker/Dockerfile
tools/arvbox/bin/arvbox

Related issues 1 (1 open0 closed)

Related to Arvados - Feature #22490: Remove `arvados-server install`NewActions
Actions #1

Updated by Brett Smith about 1 month ago

Actions #2

Updated by Tom Clegg about 1 month ago

(if we aren't deleting it outright) we can also update deps.go to something like

var goversion = strings.TrimPrefix(runtime.Version(), "go")

FYI you can also get the version string from go.mod like this

go mod edit -json | jq -r '.Toolchain|ltrimstr("go")'
Actions

Also available in: Atom PDF