diff --git a/.github/workflows/golangci-lint.yml b/.github/workflows/golangci-lint.yml index b576c7f..574a13e 100644 --- a/.github/workflows/golangci-lint.yml +++ b/.github/workflows/golangci-lint.yml @@ -18,6 +18,6 @@ jobs: - name: golangci-lint uses: golangci/golangci-lint-action@v3 with: - version: v1.50.1 - args: --timeout=5m --go=1.19 + version: v1.53.3 + args: --timeout=5m --go=1.20 only-new-issues: true diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 25c72e4..8fe1c14 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -24,7 +24,7 @@ git clone https://github.com/${GITHUB_USER}/mpi-operator.git ## Install Dependencies -We use Go v1.19+ for development and use [Go Modules](https://blog.golang.org/using-go-modules) to download and install the dependencies. +We use Go v1.20+ for development and use [Go Modules](https://blog.golang.org/using-go-modules) to download and install the dependencies. ## Run tests diff --git a/Dockerfile b/Dockerfile index ad81fcb..df54f07 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,6 @@ -FROM golang:1.19 AS build +# TODO: Once the gcr.io/distroless/base-debian12 is released, we can use `golang:1.20` as a base image. +# REF: https://github.com/GoogleContainerTools/distroless/issues/1342 +FROM golang:1.20-bullseye AS build # Set mpi-operator version # Defaults to v2 @@ -10,7 +12,7 @@ WORKDIR /go/src/github.com/kubeflow/mpi-operator RUN make RELEASE_VERSION=${RELEASE_VERSION} mpi-operator.$VERSION RUN ln -s mpi-operator.${VERSION} _output/cmd/bin/mpi-operator -FROM gcr.io/distroless/base-debian10:latest +FROM gcr.io/distroless/base-debian11:latest ENV CONTROLLER_VERSION=$VERSION COPY --from=build /go/src/github.com/kubeflow/mpi-operator/_output/cmd/bin/* /opt/ diff --git a/Makefile b/Makefile index 391cd44..1e706ae 100644 --- a/Makefile +++ b/Makefile @@ -117,11 +117,11 @@ test_images: .PHONY: tidy tidy: - go mod tidy -go 1.19 + go mod tidy -go 1.20 .PHONY: lint lint: bin/golangci-lint ## Run golangci-lint linter - $(GOLANGCI_LINT) run --new-from-rev=origin/master --go 1.19 + $(GOLANGCI_LINT) run --new-from-rev=origin/master --go 1.20 # Generate deploy/v2beta1/mpi-operator.yaml manifest: kustomize crd @@ -138,7 +138,7 @@ bin: GOLANGCI_LINT = $(shell pwd)/bin/golangci-lint .PHONY: bin/golangci-lint bin/golangci-lint: bin - @GOBIN=$(PROJECT_DIR)/bin go install github.com/golangci/golangci-lint/cmd/golangci-lint@v1.50.1 + @GOBIN=$(PROJECT_DIR)/bin go install github.com/golangci/golangci-lint/cmd/golangci-lint@v1.53.3 ENVTEST = $(shell pwd)/bin/setup-envtest .PHONY: envtest diff --git a/go.mod b/go.mod index 13edc6b..67e728a 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/kubeflow/mpi-operator -go 1.19 +go 1.20 require ( github.com/google/go-cmp v0.5.9