From 4146c0c55daf3038a02cec1dc9af6e2899c8db4e Mon Sep 17 00:00:00 2001 From: Johan Brandhorst-Satzkorn Date: Fri, 10 Feb 2023 08:16:03 -0800 Subject: [PATCH] Upgrade Go version to 1.20 (#2898) * chore: Upgrade Go version * fix: Upgrade golangci-lint to support 1.20 * fix: Don't use t.SetEnv in parallel tests This is a panic in Go 1.20 and it sounds like a recipe for distaster in general. --- .go-version | 2 +- Makefile | 2 +- internal/cmd/base/server_test.go | 1 - internal/cmd/config/config_test.go | 1 - 4 files changed, 2 insertions(+), 4 deletions(-) diff --git a/.go-version b/.go-version index 843f863534..5fb5a6b4f5 100644 --- a/.go-version +++ b/.go-version @@ -1 +1 @@ -1.19.4 +1.20 diff --git a/Makefile b/Makefile index 1501cb656b..1626c0f8a3 100644 --- a/Makefile +++ b/Makefile @@ -33,7 +33,7 @@ golangci-lint: $(eval GOLINT_INSTALLED := $(shell which golangci-lint)) if [ "$(GOLINT_INSTALLED)" = "" ]; then \ - sh scripts/install-golangci-lint.sh -b $(GO_PATH)/bin v1.50.1; \ + sh scripts/install-golangci-lint.sh -b $(GO_PATH)/bin v1.51.0; \ fi; .PHONY: cleangen diff --git a/internal/cmd/base/server_test.go b/internal/cmd/base/server_test.go index 375a52cae2..727c886dca 100644 --- a/internal/cmd/base/server_test.go +++ b/internal/cmd/base/server_test.go @@ -426,7 +426,6 @@ func TestServer_AddEventerToContext(t *testing.T) { } func TestSetupWorkerPublicAddress(t *testing.T) { - t.Parallel() tests := []struct { name string inputConfig *config.Config diff --git a/internal/cmd/config/config_test.go b/internal/cmd/config/config_test.go index cbf26b920e..04603a25eb 100644 --- a/internal/cmd/config/config_test.go +++ b/internal/cmd/config/config_test.go @@ -1888,7 +1888,6 @@ func TestDatabaseSkipSharedLockAcquisition(t *testing.T) { } func TestSetupControllerPublicClusterAddress(t *testing.T) { - t.Parallel() tests := []struct { name string inputConfig *Config