Skip to content

Commit 11b3805

Browse files
authored
Upgrade Go version to v1.20 (#583)
Signed-off-by: Yuki Iwai <[email protected]>
1 parent 18250f5 commit 11b3805

File tree

5 files changed

+11
-9
lines changed

5 files changed

+11
-9
lines changed

.github/workflows/golangci-lint.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,6 @@ jobs:
1818
- name: golangci-lint
1919
uses: golangci/golangci-lint-action@v3
2020
with:
21-
version: v1.50.1
22-
args: --timeout=5m --go=1.19
21+
version: v1.53.3
22+
args: --timeout=5m --go=1.20
2323
only-new-issues: true

CONTRIBUTING.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ git clone https://github.com/${GITHUB_USER}/mpi-operator.git
2424

2525
## Install Dependencies
2626

27-
We use Go v1.19+ for development and use [Go Modules](https://blog.golang.org/using-go-modules) to download and install the dependencies.
27+
We use Go v1.20+ for development and use [Go Modules](https://blog.golang.org/using-go-modules) to download and install the dependencies.
2828

2929
## Run tests
3030

Dockerfile

+4-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
FROM golang:1.19 AS build
1+
# TODO: Once the gcr.io/distroless/base-debian12 is released, we can use `golang:1.20` as a base image.
2+
# REF: https://github.com/GoogleContainerTools/distroless/issues/1342
3+
FROM golang:1.20-bullseye AS build
24

35
# Set mpi-operator version
46
# Defaults to v2
@@ -10,7 +12,7 @@ WORKDIR /go/src/github.com/kubeflow/mpi-operator
1012
RUN make RELEASE_VERSION=${RELEASE_VERSION} mpi-operator.$VERSION
1113
RUN ln -s mpi-operator.${VERSION} _output/cmd/bin/mpi-operator
1214

13-
FROM gcr.io/distroless/base-debian10:latest
15+
FROM gcr.io/distroless/base-debian11:latest
1416

1517
ENV CONTROLLER_VERSION=$VERSION
1618
COPY --from=build /go/src/github.com/kubeflow/mpi-operator/_output/cmd/bin/* /opt/

Makefile

+3-3
Original file line numberDiff line numberDiff line change
@@ -117,11 +117,11 @@ test_images:
117117

118118
.PHONY: tidy
119119
tidy:
120-
go mod tidy -go 1.19
120+
go mod tidy -go 1.20
121121

122122
.PHONY: lint
123123
lint: bin/golangci-lint ## Run golangci-lint linter
124-
$(GOLANGCI_LINT) run --new-from-rev=origin/master --go 1.19
124+
$(GOLANGCI_LINT) run --new-from-rev=origin/master --go 1.20
125125

126126
# Generate deploy/v2beta1/mpi-operator.yaml
127127
manifest: kustomize crd
@@ -138,7 +138,7 @@ bin:
138138
GOLANGCI_LINT = $(shell pwd)/bin/golangci-lint
139139
.PHONY: bin/golangci-lint
140140
bin/golangci-lint: bin
141-
@GOBIN=$(PROJECT_DIR)/bin go install github.com/golangci/golangci-lint/cmd/golangci-lint@v1.50.1
141+
@GOBIN=$(PROJECT_DIR)/bin go install github.com/golangci/golangci-lint/cmd/golangci-lint@v1.53.3
142142

143143
ENVTEST = $(shell pwd)/bin/setup-envtest
144144
.PHONY: envtest

go.mod

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module github.com/kubeflow/mpi-operator
22

3-
go 1.19
3+
go 1.20
44

55
require (
66
github.com/google/go-cmp v0.5.9

0 commit comments

Comments
 (0)