From de7c73ef6fdf7b8e3283bfd027b9dc07f6400400 Mon Sep 17 00:00:00 2001 From: Yuki Iwai Date: Wed, 2 Aug 2023 00:01:07 +0900 Subject: [PATCH] Upgrade Go version to v1.20 (#1873) Signed-off-by: Yuki Iwai --- Makefile | 4 ++-- build/images/training-operator/Dockerfile | 2 +- docs/development/developer_guide.md | 2 +- go.mod | 2 +- hack/swagger/go.mod | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Makefile b/Makefile index 25594d89aa..85a3d663d7 100644 --- a/Makefile +++ b/Makefile @@ -57,10 +57,10 @@ vet: ## Run go vet against code. GOLANGCI_LINT=$(shell which golangci-lint) golangci-lint: ifeq ($(GOLANGCI_LINT),) - curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(shell go env GOPATH)/bin v1.50.1 + curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(shell go env GOPATH)/bin v1.53.3 $(info golangci-lint has been installed) endif - golangci-lint run --timeout 5m --go 1.19 ./... + golangci-lint run --timeout 5m --go 1.20 ./... ENVTEST_K8S_VERSION ?= 1.27 HAS_SETUP_ENVTEST := $(shell command -v setup-envtest;) diff --git a/build/images/training-operator/Dockerfile b/build/images/training-operator/Dockerfile index dc5a48dce5..6ceff2d664 100644 --- a/build/images/training-operator/Dockerfile +++ b/build/images/training-operator/Dockerfile @@ -1,5 +1,5 @@ # Build the manager binary -FROM golang:1.19 as builder +FROM golang:1.20 as builder WORKDIR /workspace # Copy the Go Modules manifests diff --git a/docs/development/developer_guide.md b/docs/development/developer_guide.md index 8173bbf5db..8e89d866a7 100644 --- a/docs/development/developer_guide.md +++ b/docs/development/developer_guide.md @@ -4,7 +4,7 @@ Kubeflow Training Operator is currently at v1. ## Requirements -- [Go](https://golang.org/) (1.17 or later) +- [Go](https://golang.org/) (1.20 or later) ## Building the operator diff --git a/go.mod b/go.mod index 0e560fe433..36c7535408 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/kubeflow/training-operator -go 1.19 +go 1.20 require ( github.com/go-logr/logr v1.2.4 diff --git a/hack/swagger/go.mod b/hack/swagger/go.mod index a66e24ae48..a976397539 100644 --- a/hack/swagger/go.mod +++ b/hack/swagger/go.mod @@ -1,6 +1,6 @@ module github.com/kubeflow/training-operator/hack/swagger -go 1.19 +go 1.20 require ( github.com/kubeflow/training-operator v0.0.0-00010101000000-000000000000