diff --git a/.circleci/Dockerfile b/.circleci/Dockerfile index f5e7bf5c64..4e5fd38313 100644 --- a/.circleci/Dockerfile +++ b/.circleci/Dockerfile @@ -1,4 +1,5 @@ -FROM --platform=$TARGETPLATFORM golang:1.22-bullseye +# When upgrading golang, make sure to update the docker executors that use snyklabs/cli-build in .circleci/config.yml +FROM --platform=$TARGETPLATFORM golang:1.23-bullseye # install "normal" stuff diff --git a/.circleci/config.yml b/.circleci/config.yml index ab1af6bf8f..14719e677e 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -16,7 +16,7 @@ parameters: go_version: type: string # https://go.dev/doc/devel/release - default: '1.22.6' + default: '1.23.2' aws_version: type: string # https://github.com/aws/aws-cli/blob/v2/CHANGELOG.rst @@ -47,22 +47,22 @@ executors: resource_class: small docker-amd64: docker: - - image: snyklabs/cli-build:20240814-161347 + - image: snyklabs/cli-build:20241015-082358 working_directory: /mnt/ramdisk/snyk resource_class: large docker-amd64-xl: docker: - - image: snyklabs/cli-build:20240814-161347 + - image: snyklabs/cli-build:20241015-082358 working_directory: /mnt/ramdisk/snyk resource_class: xlarge docker-arm64: docker: - - image: snyklabs/cli-build-arm64:20240814-161347 + - image: snyklabs/cli-build-arm64:20241015-082358 working_directory: /mnt/ramdisk/snyk resource_class: arm.large docker-arm64-xl: docker: - - image: snyklabs/cli-build-arm64:20240814-161347 + - image: snyklabs/cli-build-arm64:20241015-082358 working_directory: /mnt/ramdisk/snyk resource_class: arm.xlarge linux-ubuntu-mantic-amd64: diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 1d73e5f3b4..b5a7ba8f15 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -356,6 +356,10 @@ If you have made changes to the `go-application-framework`, you can run `python3 You can then raise a pr with the relevant changes. +## Upgrading go-lang versions + +When upgrading golang, you will need to update the Dockerfile under .circleci, run the _Create Build Image_ job on github, and update the docker executor that use the `snyklabs/cli-build` image in the .circleci/config.yml file, to use the new image. + --- Questions? Ask Hammerhead 🔨 diff --git a/cliv2/Makefile b/cliv2/Makefile index 9fb8cb20d2..60a638d440 100644 --- a/cliv2/Makefile +++ b/cliv2/Makefile @@ -19,7 +19,7 @@ export LS_PROTOCOL_VERSION= # Build tools GO_BIN := $(shell pwd)/.bin -OVERRIDE_GOCI_LINT_V := v1.59.1 +OVERRIDE_GOCI_LINT_V := v1.61.0 SHELL := env PATH=$(GO_BIN):$(PATH) $(SHELL) # Make directories per convention diff --git a/cliv2/cmd/cliv2/main.go b/cliv2/cmd/cliv2/main.go index 84519f99d6..a422b267fd 100644 --- a/cliv2/cmd/cliv2/main.go +++ b/cliv2/cmd/cliv2/main.go @@ -307,7 +307,7 @@ func getGlobalFLags() *pflag.FlagSet { } func emptyCommandFunction(_ *cobra.Command, _ []string) error { - return fmt.Errorf(unknownCommandMessage) + return fmt.Errorf("%s", unknownCommandMessage) } func createCommandsForWorkflows(rootCommand *cobra.Command, engine workflow.Engine) { diff --git a/cliv2/go.mod b/cliv2/go.mod index fcb9427958..1d1913ea49 100644 --- a/cliv2/go.mod +++ b/cliv2/go.mod @@ -1,8 +1,8 @@ module github.com/snyk/cli/cliv2 -go 1.22 +go 1.23 -toolchain go1.22.6 +toolchain go1.23.2 require ( github.com/elazarl/goproxy v0.0.0-20231031074852-3ec07828be7a