From 554b1637706cc2f9eb9a3c31dd68ac616dfa9a67 Mon Sep 17 00:00:00 2001 From: Peter Hunt Date: Wed, 12 Apr 2023 15:14:04 -0400 Subject: [PATCH 1/3] vendor: bump to kube 1.27.0 Signed-off-by: Peter Hunt --- go.mod | 6 +++--- vendor/modules.txt | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/go.mod b/go.mod index db2fffa620..054a1eb1be 100644 --- a/go.mod +++ b/go.mod @@ -24,9 +24,9 @@ require ( k8s.io/api v0.25.0 k8s.io/apimachinery v0.25.0 k8s.io/client-go v1.5.2 - k8s.io/cri-api v0.26.0 - k8s.io/kubectl v0.26.0 - k8s.io/kubernetes v1.26.0 + k8s.io/cri-api v0.27.0 + k8s.io/kubectl v0.27.0 + k8s.io/kubernetes v1.27.0 sigs.k8s.io/yaml v1.3.0 ) diff --git a/vendor/modules.txt b/vendor/modules.txt index 52b3d75c39..cd5ceb5f2e 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -702,7 +702,7 @@ k8s.io/component-base/metrics/prometheusextension k8s.io/component-base/tracing k8s.io/component-base/tracing/api/v1 k8s.io/component-base/version -# k8s.io/cri-api v0.26.0 => k8s.io/kubernetes/staging/src/k8s.io/cri-api v0.0.0-20221208195143-b46a3f887ca9 +# k8s.io/cri-api v0.27.0 => k8s.io/kubernetes/staging/src/k8s.io/cri-api v0.0.0-20221208195143-b46a3f887ca9 ## explicit; go 1.19 k8s.io/cri-api/pkg/apis k8s.io/cri-api/pkg/apis/runtime/v1 @@ -728,11 +728,11 @@ k8s.io/kube-openapi/pkg/schemamutation k8s.io/kube-openapi/pkg/spec3 k8s.io/kube-openapi/pkg/util/proto k8s.io/kube-openapi/pkg/validation/spec -# k8s.io/kubectl v0.26.0 => k8s.io/kubernetes/staging/src/k8s.io/kubectl v0.0.0-20221208195143-b46a3f887ca9 +# k8s.io/kubectl v0.27.0 => k8s.io/kubernetes/staging/src/k8s.io/kubectl v0.0.0-20221208195143-b46a3f887ca9 ## explicit; go 1.19 k8s.io/kubectl/pkg/util/interrupt k8s.io/kubectl/pkg/util/term -# k8s.io/kubernetes v1.26.0 => k8s.io/kubernetes v1.26.0 +# k8s.io/kubernetes v1.27.0 => k8s.io/kubernetes v1.26.0 ## explicit; go 1.19 k8s.io/kubernetes/pkg/apis/core k8s.io/kubernetes/pkg/apis/scheduling From 8d781b8f172a777c4e9781c278bd0572b3960235 Mon Sep 17 00:00:00 2001 From: Peter Hunt Date: Wed, 12 Apr 2023 15:15:49 -0400 Subject: [PATCH 2/3] bump to go 1.20 Signed-off-by: Peter Hunt --- .github/workflows/build.yml | 4 ++-- .github/workflows/containerd.yml | 2 +- .github/workflows/crio.yml | 2 +- .github/workflows/e2e.yml | 2 +- .github/workflows/release.yml | 2 +- go.mod | 2 +- 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 29accf3023..50621dbc42 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -20,7 +20,7 @@ jobs: - name: Install Go uses: actions/setup-go@v2 with: - go-version: '1.19' + go-version: '1.20' - name: Set env shell: bash @@ -64,7 +64,7 @@ jobs: - name: Install Go uses: actions/setup-go@v2 with: - go-version: '1.19' + go-version: '1.20' - name: Set env shell: bash diff --git a/.github/workflows/containerd.yml b/.github/workflows/containerd.yml index a32a1f2d0f..77578c6aa9 100644 --- a/.github/workflows/containerd.yml +++ b/.github/workflows/containerd.yml @@ -47,7 +47,7 @@ jobs: - name: Install Go uses: actions/setup-go@v2 with: - go-version: '1.19' + go-version: '1.20' - name: Set env shell: bash diff --git a/.github/workflows/crio.yml b/.github/workflows/crio.yml index 4fdab66ea0..e21abc2329 100644 --- a/.github/workflows/crio.yml +++ b/.github/workflows/crio.yml @@ -20,7 +20,7 @@ jobs: - name: Install go uses: actions/setup-go@v2 with: - go-version: '1.19' + go-version: '1.20' - name: Setup environment shell: bash diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml index 4ae8a54e36..9de5c26153 100644 --- a/.github/workflows/e2e.yml +++ b/.github/workflows/e2e.yml @@ -20,7 +20,7 @@ jobs: - name: Install Go uses: actions/setup-go@v2 with: - go-version: '1.19' + go-version: '1.20' - name: Set env shell: bash diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index a9e6088756..9bb71af92a 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -10,7 +10,7 @@ jobs: steps: - uses: actions/setup-go@v2 with: - go-version: '1.19' + go-version: '1.20' - name: Set env shell: bash run: | diff --git a/go.mod b/go.mod index 054a1eb1be..34efc98f5a 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/kubernetes-sigs/cri-tools -go 1.19 +go 1.20 require ( github.com/docker/distribution v2.8.1+incompatible From c953d28b903618f751685ca295c90462f13116f9 Mon Sep 17 00:00:00 2001 From: Peter Hunt Date: Wed, 12 Apr 2023 15:30:29 -0400 Subject: [PATCH 3/3] golangci-lint: bump to 1.52.2 and fix errors Signed-off-by: Peter Hunt --- .golangci.yml | 5 +---- Makefile | 2 +- pkg/validate/container.go | 10 ++++++---- 3 files changed, 8 insertions(+), 9 deletions(-) diff --git a/.golangci.yml b/.golangci.yml index a5625fb908..507f1873e8 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -5,7 +5,6 @@ run: linters: disable-all: true enable: - - deadcode - depguard - durationcheck - forcetypeassert @@ -21,11 +20,10 @@ linters: - prealloc - predeclared - promlinter - - structcheck - tagliatelle - typecheck - - varcheck - wastedassign + - unused # - asciicheck # - bodyclose # - cyclop @@ -75,7 +73,6 @@ linters: # - tparallel # - unconvert # - unparam - # - unused # - whitespace # - wrapcheck # - wsl diff --git a/Makefile b/Makefile index c6e3ddbccf..1b4bed6e0a 100644 --- a/Makefile +++ b/Makefile @@ -112,7 +112,7 @@ install.lint: $(GOLANGCI_LINT) $(GOLANGCI_LINT): export \ - VERSION=v1.46.2 \ + VERSION=v1.52.2 \ URL=https://raw.githubusercontent.com/golangci/golangci-lint \ BINDIR=${BUILD_BIN_PATH} && \ curl -sfL $$URL/$$VERSION/install.sh | sh -s $$VERSION diff --git a/pkg/validate/container.go b/pkg/validate/container.go index d93bb1060f..e1e5644cc5 100644 --- a/pkg/validate/container.go +++ b/pkg/validate/container.go @@ -573,8 +573,9 @@ func pathExists(path string) bool { // parseDockerJSONLog parses logs in Docker JSON log format. // Docker JSON log format example: -// {"log":"content 1","stream":"stdout","time":"2016-10-20T18:39:20.57606443Z"} -// {"log":"content 2","stream":"stderr","time":"2016-10-20T18:39:20.57606444Z"} +// +// {"log":"content 1","stream":"stdout","time":"2016-10-20T18:39:20.57606443Z"} +// {"log":"content 2","stream":"stderr","time":"2016-10-20T18:39:20.57606444Z"} func parseDockerJSONLog(log []byte, msg *logMessage) { var l jsonlog.JSONLog @@ -588,8 +589,9 @@ func parseDockerJSONLog(log []byte, msg *logMessage) { // parseCRILog parses logs in CRI log format. // CRI log format example : -// 2016-10-06T00:17:09.669794202Z stdout P The content of the log entry 1 -// 2016-10-06T00:17:10.113242941Z stderr F The content of the log entry 2 +// +// 2016-10-06T00:17:09.669794202Z stdout P The content of the log entry 1 +// 2016-10-06T00:17:10.113242941Z stderr F The content of the log entry 2 func parseCRILog(log string, msg *logMessage) { logMessage := strings.SplitN(log, " ", 4) if len(log) < 4 {