From bee2749dbdcc710da32ae73c31d1606e1553aafb Mon Sep 17 00:00:00 2001 From: Haitao Chen Date: Thu, 10 Oct 2024 00:19:58 -0700 Subject: [PATCH 1/2] Revert "Merge pull request #3757 from saschagrunert/go-1.23" This reverts commit efc04ec06d43b7e1d826748f01006e4b09a3e927, reversing changes made to 95e51653f5cf75da34b2bc2aa6432841babe0d3d. --- .github/workflows/codeql-analysis.yml | 2 +- .github/workflows/lint.yml | 4 +- .github/workflows/release.yml | 2 +- .github/workflows/snapshot.yaml | 2 +- .golangci.yml | 73 ++++++++++++++++++++++++++- dependencies.yaml | 12 ++--- go.mod | 8 +-- go.sum | 15 +++--- 8 files changed, 92 insertions(+), 26 deletions(-) diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index 533233d0bf1..86fb7cc5ed9 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -59,7 +59,7 @@ jobs: id: go uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2 with: - go-version: '1.23' + go-version: '1.22' check-latest: true # Initializes the CodeQL tools for scanning. diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 771aa417af5..4f33307b9dc 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -19,10 +19,10 @@ jobs: id: go uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2 with: - go-version: '1.23' + go-version: '1.22' check-latest: true - name: golangci-lint uses: golangci/golangci-lint-action@971e284b6050e8a5849b72094c50ab08da042db8 # v6.1.1 with: - version: v1.61 + version: v1.60 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index d33859ec3eb..f28d4dc5bf2 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -32,7 +32,7 @@ jobs: id: go uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2 with: - go-version: '1.23' + go-version: '1.22' check-latest: true - uses: sigstore/cosign-installer@dc72c7d5c4d10cd6bcb8cf6e3fd625a9e5e537da # v3.7.0 diff --git a/.github/workflows/snapshot.yaml b/.github/workflows/snapshot.yaml index b83fc3c7cef..086f46988d5 100644 --- a/.github/workflows/snapshot.yaml +++ b/.github/workflows/snapshot.yaml @@ -26,7 +26,7 @@ jobs: id: go uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2 with: - go-version: '1.23' + go-version: '1.22' check-latest: true - name: Install bom diff --git a/.golangci.yml b/.golangci.yml index ceb26b491b1..73855a03cf5 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -148,7 +148,78 @@ linters-settings: check-type-assertions: true check-blank: true gocritic: - enable-all: true + enabled-checks: + - appendCombine + - badLock + - badRegexp + - badSorting + - badSyncOnceFunc + - boolExprSimplify + - builtinShadow + - builtinShadowDecl + - commentedOutCode + - commentedOutImport + - deferInLoop + - deferUnlambda + - docStub + - dupImport + - dynamicFmtString + - emptyDecl + - emptyFallthrough + - emptyStringTest + - equalFold + - evalOrder + - exposedSyncMutex + - externalErrorReassign + - filepathJoin + - hexLiteral + - httpNoBody + - hugeParam + - importShadow + - indexAlloc + - initClause + - methodExprCall + - nestingReduce + - nilValReturn + - octalLiteral + - paramTypeCombine + - preferDecodeRune + - preferFilepathJoin + - preferFprint + - preferStringWriter + - preferWriteByte + - ptrToRefParam + - rangeExprCopy + - rangeValCopy + - redundantSprint + - regexpPattern + - regexpSimplify + - returnAfterHttpError + - ruleguard + - sliceClear + - sloppyReassign + - sortSlice + - sprintfQuotedString + - sqlQuery + - stringConcatSimplify + - stringXbytes + - stringsCompare + - syncMapLoadAndDelete + - timeExprSimplify + - todoCommentWithoutDetail + - tooManyResultsChecker + - truncateCmp + - typeAssertChain + - typeDefFirst + - typeUnparen + - uncheckedInlineErr + - unlabelStmt + - unnamedResult + - unnecessaryBlock + - unnecessaryDefer + - weakCond + - whyNoLint + - yodaStyleExpr nolintlint: # Enable to ensure that nolint directives are all used. Default is true. allow-unused: false diff --git a/dependencies.yaml b/dependencies.yaml index 3bbc86c4c72..305ee864df6 100644 --- a/dependencies.yaml +++ b/dependencies.yaml @@ -53,19 +53,13 @@ dependencies: match: "GO_MAJOR_VERSION: '\\d+.\\d+'" - name: "golang: 1. (github workflows)" - version: 1.23 + version: 1.22 refPaths: - path: .github/workflows/release.yml match: "go-version: '\\d+.\\d+'" - - path: .github/workflows/snapshot.yaml - match: "go-version: '\\d+.\\d+'" - - path: .github/workflows/lint.yml - match: "go-version: '\\d+.\\d+'" - - path: .github/workflows/codeql-analysis.yml - match: "go-version: '\\d+.\\d+'" - name: "golang: go.mod" - version: 1.23 + version: 1.22 refPaths: - path: go.mod match: go \d+.\d+ @@ -388,7 +382,7 @@ dependencies: # golangci-lint-version - name: "golangci-lint" - version: v1.61 + version: v1.60 refPaths: - path: .github/workflows/lint.yml match: "version: v\\d+.\\d+?\\.?(\\d+)?" diff --git a/go.mod b/go.mod index efab92c1d02..70a1503b1de 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module k8s.io/release -go 1.23 +go 1.22.4 require ( cloud.google.com/go/storage v1.39.1 @@ -67,7 +67,7 @@ require ( github.com/Azure/go-autorest/autorest/date v0.3.0 // indirect github.com/Azure/go-autorest/logger v0.2.1 // indirect github.com/Azure/go-autorest/tracing v0.6.0 // indirect - github.com/BurntSushi/toml v0.3.1 // indirect + github.com/BurntSushi/toml v1.2.1 // indirect github.com/MakeNowJust/heredoc/v2 v2.0.1 // indirect github.com/Microsoft/go-winio v0.6.2 // indirect github.com/OneOfOne/xxhash v1.2.8 // indirect @@ -293,8 +293,8 @@ require ( gopkg.in/ini.v1 v1.67.0 // indirect gopkg.in/warnings.v0 v0.1.2 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect - k8s.io/api v0.28.3 // indirect - k8s.io/client-go v0.28.3 // indirect + k8s.io/api v0.28.4 // indirect + k8s.io/client-go v0.28.4 // indirect k8s.io/klog/v2 v2.130.1 // indirect k8s.io/kube-openapi v0.0.0-20240228011516-70dd3763d340 // indirect modernc.org/libc v1.37.6 // indirect diff --git a/go.sum b/go.sum index 15b58b51e77..77a89e1a3c5 100644 --- a/go.sum +++ b/go.sum @@ -92,8 +92,9 @@ github.com/Azure/go-autorest/tracing v0.6.0 h1:TYi4+3m5t6K48TGI9AUdb+IzbnSxvnvUM github.com/Azure/go-autorest/tracing v0.6.0/go.mod h1:+vhtPC754Xsa23ID7GlGsrdKBpUA79WCAKPPZVC2DeU= github.com/AzureAD/microsoft-authentication-library-for-go v1.2.2 h1:XHOnouVk1mxXfQidrMEnLlPk9UMeRtyBTnEFtxkV0kU= github.com/AzureAD/microsoft-authentication-library-for-go v1.2.2/go.mod h1:wP83P5OoQ5p6ip3ScPr0BAq0BvuPAvacpEuSzyouqAI= -github.com/BurntSushi/toml v0.3.1 h1:WXkYYl6Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= +github.com/BurntSushi/toml v1.2.1 h1:9F2/+DoOYIOksmaJFPw1tGFy1eDnIJXg+UHjuD8lTak= +github.com/BurntSushi/toml v1.2.1/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ= github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= github.com/GoogleCloudPlatform/testgrid v0.0.38 h1:DRF37FwrwKaP3ze+Yvt21WvXoiDEZNYYem2zWcjgU/g= github.com/GoogleCloudPlatform/testgrid v0.0.38/go.mod h1:KGQ3wqPuX1xCqeSHvcGmAafuMtV7cRNST9hZS7VCahA= @@ -1284,12 +1285,12 @@ honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWh honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= -k8s.io/api v0.28.3 h1:Gj1HtbSdB4P08C8rs9AR94MfSGpRhJgsS+GF9V26xMM= -k8s.io/api v0.28.3/go.mod h1:MRCV/jr1dW87/qJnZ57U5Pak65LGmQVkKTzf3AtKFHc= -k8s.io/apimachinery v0.31.1 h1:mhcUBbj7KUjaVhyXILglcVjuS4nYXiwC+KKFBgIVy7U= -k8s.io/apimachinery v0.31.1/go.mod h1:rsPdaZJfTfLsNJSQzNHQvYoTmxhoOEofxtOsF3rtsMo= -k8s.io/client-go v0.28.3 h1:2OqNb72ZuTZPKCl+4gTKvqao0AMOl9f3o2ijbAj3LI4= -k8s.io/client-go v0.28.3/go.mod h1:LTykbBp9gsA7SwqirlCXBWtK0guzfhpoW4qSm7i9dxo= +k8s.io/api v0.28.4 h1:8ZBrLjwosLl/NYgv1P7EQLqoO8MGQApnbgH8tu3BMzY= +k8s.io/api v0.28.4/go.mod h1:axWTGrY88s/5YE+JSt4uUi6NMM+gur1en2REMR7IRj0= +k8s.io/apimachinery v0.31.0 h1:m9jOiSr3FoSSL5WO9bjm1n6B9KROYYgNZOb4tyZ1lBc= +k8s.io/apimachinery v0.31.0/go.mod h1:rsPdaZJfTfLsNJSQzNHQvYoTmxhoOEofxtOsF3rtsMo= +k8s.io/client-go v0.28.4 h1:Np5ocjlZcTrkyRJ3+T3PkXDpe4UpatQxj85+xjaD2wY= +k8s.io/client-go v0.28.4/go.mod h1:0VDZFpgoZfelyP5Wqu0/r/TRYcLYuJ2U1KEeoaPa1N4= k8s.io/klog/v2 v2.130.1 h1:n9Xl7H1Xvksem4KFG4PYbdQCQxqc/tTUyrgXaOhHSzk= k8s.io/klog/v2 v2.130.1/go.mod h1:3Jpz1GvMt720eyJH1ckRHK1EDfpxISzJ7I9OYgaDtPE= k8s.io/kube-openapi v0.0.0-20240228011516-70dd3763d340 h1:BZqlfIlq5YbRMFko6/PM7FjZpUb45WallggurYhKGag= From d01f6d871dd5e64fb46b2feb8768ddd166fab2d8 Mon Sep 17 00:00:00 2001 From: Haitao Chen Date: Thu, 10 Oct 2024 00:21:16 -0700 Subject: [PATCH 2/2] revert module bump - maxbrunsfeld/counterfeiter to v6.9.0 - sigs.k8s.io/release-utils to v0.8.4 --- go.mod | 4 ++-- go.sum | 16 ++++++++-------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/go.mod b/go.mod index 70a1503b1de..05e65b904f5 100644 --- a/go.mod +++ b/go.mod @@ -17,7 +17,7 @@ require ( github.com/hashicorp/go-multierror v1.1.1 github.com/in-toto/in-toto-golang v0.9.0 github.com/mattn/go-isatty v0.0.20 - github.com/maxbrunsfeld/counterfeiter/v6 v6.10.0 + github.com/maxbrunsfeld/counterfeiter/v6 v6.9.0 github.com/mitchellh/mapstructure v1.5.0 github.com/nozzle/throttler v0.0.0-20180817012639-2ea982251481 github.com/olekukonko/tablewriter v0.0.5 @@ -44,7 +44,7 @@ require ( sigs.k8s.io/mdtoc v1.4.0 sigs.k8s.io/promo-tools/v3 v3.6.0 sigs.k8s.io/release-sdk v0.12.1 - sigs.k8s.io/release-utils v0.8.5 + sigs.k8s.io/release-utils v0.8.4 sigs.k8s.io/yaml v1.4.0 ) diff --git a/go.sum b/go.sum index 77a89e1a3c5..14dbd792f99 100644 --- a/go.sum +++ b/go.sum @@ -604,8 +604,8 @@ github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D github.com/mattn/go-runewidth v0.0.9/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI= github.com/mattn/go-runewidth v0.0.15 h1:UNAjwbU9l54TA3KzvqLGxwWjHmMgBUVhBiTjelZgg3U= github.com/mattn/go-runewidth v0.0.15/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w= -github.com/maxbrunsfeld/counterfeiter/v6 v6.10.0 h1:9WsegDYiSKtZXru+NcOB4z7iqb00n4atjmQlyy5TRXI= -github.com/maxbrunsfeld/counterfeiter/v6 v6.10.0/go.mod h1:TeVdzh+5QB5IpWDJAU/uviXA6kOg9yXzLrrjeLKJXqY= +github.com/maxbrunsfeld/counterfeiter/v6 v6.9.0 h1:ERhc+PJKEyqWQnKu7/K0frSVGFihYYImqNdqP5r0cN0= +github.com/maxbrunsfeld/counterfeiter/v6 v6.9.0/go.mod h1:tU2wQdIyJ7fib/YXxFR0dgLlFz3yl4p275UfUKmDFjk= github.com/miekg/dns v1.1.57 h1:Jzi7ApEIzwEPLHWRcafCN9LZSBbqQpxjt/wpgvg7wcM= github.com/miekg/dns v1.1.57/go.mod h1:uqRjCRUuEAA6qsOiJvDd+CFo/vW+y5WR6SNmHE55hZk= github.com/miekg/pkcs11 v1.0.3-0.20190429190417-a667d056470f/go.mod h1:XsNlhZGX73bx86s2hdc/FuaLm2CPZJemRLMA+WTFxgs= @@ -656,8 +656,8 @@ github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7J github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= github.com/onsi/gomega v1.17.0/go.mod h1:HnhC7FXeEQY45zxNK3PPoIUhzk/80Xly9PcubAlGdZY= github.com/onsi/gomega v1.19.0/go.mod h1:LY+I3pBVzYsTBU1AnDwOSxaYi9WoWiqgwooUqq9yPro= -github.com/onsi/gomega v1.34.2 h1:pNCwDkzrsv7MS9kpaQvVb1aVLahQXyJ/Tv5oAZMI3i8= -github.com/onsi/gomega v1.34.2/go.mod h1:v1xfxRgk0KIsG+QOdm7p8UosrOzPYRo60fd3B/1Dukc= +github.com/onsi/gomega v1.34.1 h1:EUMJIKUjM8sKjYbtxQI9A4z2o+rruxnzNvpknOXie6k= +github.com/onsi/gomega v1.34.1/go.mod h1:kU1QgUvBDLXBJq618Xvm2LUX6rSAfRaFRTcdOeDLwwY= github.com/open-policy-agent/opa v0.68.0 h1:Jl3U2vXRjwk7JrHmS19U3HZO5qxQRinQbJ2eCJYSqJQ= github.com/open-policy-agent/opa v0.68.0/go.mod h1:5E5SvaPwTpwt2WM177I9Z3eT7qUpmOGjk1ZdHs+TZ4w= github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U= @@ -1287,8 +1287,8 @@ honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9 honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= k8s.io/api v0.28.4 h1:8ZBrLjwosLl/NYgv1P7EQLqoO8MGQApnbgH8tu3BMzY= k8s.io/api v0.28.4/go.mod h1:axWTGrY88s/5YE+JSt4uUi6NMM+gur1en2REMR7IRj0= -k8s.io/apimachinery v0.31.0 h1:m9jOiSr3FoSSL5WO9bjm1n6B9KROYYgNZOb4tyZ1lBc= -k8s.io/apimachinery v0.31.0/go.mod h1:rsPdaZJfTfLsNJSQzNHQvYoTmxhoOEofxtOsF3rtsMo= +k8s.io/apimachinery v0.31.1 h1:mhcUBbj7KUjaVhyXILglcVjuS4nYXiwC+KKFBgIVy7U= +k8s.io/apimachinery v0.31.1/go.mod h1:rsPdaZJfTfLsNJSQzNHQvYoTmxhoOEofxtOsF3rtsMo= k8s.io/client-go v0.28.4 h1:Np5ocjlZcTrkyRJ3+T3PkXDpe4UpatQxj85+xjaD2wY= k8s.io/client-go v0.28.4/go.mod h1:0VDZFpgoZfelyP5Wqu0/r/TRYcLYuJ2U1KEeoaPa1N4= k8s.io/klog/v2 v2.130.1 h1:n9Xl7H1Xvksem4KFG4PYbdQCQxqc/tTUyrgXaOhHSzk= @@ -1318,8 +1318,8 @@ sigs.k8s.io/promo-tools/v3 v3.6.0 h1:C2L08ezrWm1aZI8Emd3iZPZQserLPRgzuqQVxvI0PUI sigs.k8s.io/promo-tools/v3 v3.6.0/go.mod h1:XJ3jy0hJYs+hWKt8XsLHFzGQV8PUtvllvbxjN/E5RXI= sigs.k8s.io/release-sdk v0.12.1 h1:/Q+yWpl33EnFx1b7xh6FnbioWSRUTrVkigL4KZVTrkU= sigs.k8s.io/release-sdk v0.12.1/go.mod h1:nnB4tt1g0VXMUCIYzDzPVqNI896OQrWipE6WbyZ6FSk= -sigs.k8s.io/release-utils v0.8.5 h1:FUtFqEAN621gSXv0L7kHyWruBeS7TUU9aWf76olX7uQ= -sigs.k8s.io/release-utils v0.8.5/go.mod h1:qsm5bdxdgoHkD8HsXpgme2/c3mdsNaiV53Sz2HmKeJA= +sigs.k8s.io/release-utils v0.8.4 h1:4QVr3UgbyY/d9p74LBhg0njSVQofUsAZqYOzVZBhdBw= +sigs.k8s.io/release-utils v0.8.4/go.mod h1:m1bHfscTemQp+z+pLCZnkXih9n0+WukIUU70n6nFnU0= sigs.k8s.io/structured-merge-diff/v4 v4.4.1 h1:150L+0vs/8DA78h1u02ooW1/fFq/Lwr+sGiqlzvrtq4= sigs.k8s.io/structured-merge-diff/v4 v4.4.1/go.mod h1:N8hJocpFajUSSeSJ9bOZ77VzejKZaXsTtZo4/u7Io08= sigs.k8s.io/yaml v1.1.0/go.mod h1:UJmg0vDUVViEyp3mgSv9WPwZCDxu4rQW1olrI1uml+o=