From 0248397dbfcf5d956677f1627fecb757b27fb2c3 Mon Sep 17 00:00:00 2001 From: Sascha Grunert Date: Mon, 26 Aug 2024 09:44:45 +0200 Subject: [PATCH] Bump CI go version and linter Signed-off-by: Sascha Grunert --- .github/workflows/test.yaml | 14 +++++++------- .golangci.yml | 1 - Makefile | 2 +- pkg/ocicni/ocicni.go | 4 ++-- 4 files changed, 10 insertions(+), 11 deletions(-) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 8a9e527..19554b6 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -4,7 +4,7 @@ name: test on: ["push", "pull_request"] env: - GO_VERSION: "1.22" + GO_VERSION: "1.23" LINUX_ARCHES: "amd64 386 arm arm64 s390x mips64le ppc64le" jobs: @@ -12,11 +12,10 @@ jobs: name: Build all linux architectures runs-on: ubuntu-latest steps: - - name: setup go - uses: actions/setup-go@v5 + - uses: actions/checkout@v4 + - uses: actions/setup-go@v5 with: go-version: ${{ env.GO_VERSION }} - - uses: actions/checkout@v4 - name: Build on all supported architectures run: | @@ -30,11 +29,10 @@ jobs: name: Run tests on Linux amd64 runs-on: ubuntu-latest steps: - - name: setup go - uses: actions/setup-go@v5 + - uses: actions/checkout@v4 + - uses: actions/setup-go@v5 with: go-version: ${{ env.GO_VERSION }} - - uses: actions/checkout@v4 - name: Install test binaries run: | @@ -58,4 +56,6 @@ jobs: steps: - uses: actions/checkout@v4 - uses: actions/setup-go@v5 + with: + go-version: ${{ env.GO_VERSION }} - run: make lint diff --git a/.golangci.yml b/.golangci.yml index 507e711..84e52e0 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -23,7 +23,6 @@ linters: - errname - errorlint - exhaustive - - exportloopref - fatcontext - forbidigo - forcetypeassert diff --git a/Makefile b/Makefile index e9f34ef..082bff2 100644 --- a/Makefile +++ b/Makefile @@ -16,7 +16,7 @@ BUILD_INFO := $(shell date +%s) BUILD_PATH := $(shell pwd)/build GOLANGCI_LINT := ${BUILD_PATH}/golangci-lint -GOLANGCI_LINT_VERSION := v1.59.1 +GOLANGCI_LINT_VERSION := v1.60.3 # If GOPATH not specified, use one in the local directory ifeq ($(GOPATH),) diff --git a/pkg/ocicni/ocicni.go b/pkg/ocicni/ocicni.go index 1201dc7..8ad481b 100644 --- a/pkg/ocicni/ocicni.go +++ b/pkg/ocicni/ocicni.go @@ -584,7 +584,7 @@ func (plugin *cniNetworkPlugin) SetUpPodWithContext(ctx context.Context, podNetw // Set up loopback interface if err := bringUpLoopback(podNetwork.NetNS); err != nil { - logrus.Errorf(err.Error()) + logrus.Error(err) return nil, err } @@ -732,7 +732,7 @@ func (plugin *cniNetworkPlugin) GetPodNetworkStatusWithContext(ctx context.Conte defer plugin.podUnlock(&podNetwork) if err := checkLoopback(podNetwork.NetNS); err != nil { - logrus.Errorf(err.Error()) + logrus.Error(err) return nil, err }