From 074f925951fde4f34b0d1b76e6588122841546d6 Mon Sep 17 00:00:00 2001 From: Jordan Liggitt Date: Thu, 25 Jul 2024 09:31:45 -0400 Subject: [PATCH 1/2] Fix verify-vendor script to check all go.mod and go.sum files --- hack/verify-vendor.sh | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/hack/verify-vendor.sh b/hack/verify-vendor.sh index 0fea7224a7f..dbdefedae39 100755 --- a/hack/verify-vendor.sh +++ b/hack/verify-vendor.sh @@ -62,15 +62,17 @@ popd > /dev/null 2>&1 ret=0 pushd "${KUBE_ROOT}" > /dev/null 2>&1 - # Test for diffs - if ! _out="$(diff -Naupr --ignore-matching-lines='^\s*\"GoVersion\":' go.mod "${_kubetmp}/go.mod")"; then - echo "Your go.mod file is different:" >&2 - echo "${_out}" >&2 - echo "Vendor Verify failed." >&2 - echo "If you're seeing this locally, run the below command to fix your go.mod:" >&2 - echo "hack/update-vendor.sh" >&2 - ret=1 - fi + # Test for diffs in go.mod / go.sum / go.work + for file in $(git ls-files -cmo --exclude-standard -- ':!:vendor/*' ':(glob)**/go.mod' ':(glob)**/go.sum' ':(glob)**/go.work'); do + if ! _out="$(diff -Naupr "${file}" "${_kubetmp}/${file}")"; then + echo "Your ${file} file is different:" >&2 + echo "${_out}" >&2 + echo "Vendor Verify failed." >&2 + echo "If you're seeing this locally, run the below command to fix this:" >&2 + echo "hack/update-vendor.sh" >&2 + ret=1 + fi + done if ! _out="$(diff -Naupr -x "AUTHORS*" -x "CONTRIBUTORS*" vendor "${_kubetmp}/vendor")"; then echo "Your vendored results are different:" >&2 From a361ec621b72f57e591797b4a96f097aaa31f94d Mon Sep 17 00:00:00 2001 From: Davanum Srinivas Date: Wed, 11 Sep 2024 23:19:37 +0000 Subject: [PATCH 2/2] run update-vendor.sh and fix up broken go.sum(s) --- staging/src/k8s.io/code-generator/go.sum | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/staging/src/k8s.io/code-generator/go.sum b/staging/src/k8s.io/code-generator/go.sum index d6e23c53543..097cccb779b 100644 --- a/staging/src/k8s.io/code-generator/go.sum +++ b/staging/src/k8s.io/code-generator/go.sum @@ -5,12 +5,10 @@ github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ3 github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM= -github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/emicklei/go-restful/v3 v3.11.0 h1:rAQeMHw1c7zTmncogyy8VvRZwtkmkZ4FxERmMY4rD+g= github.com/emicklei/go-restful/v3 v3.11.0/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc= -github.com/fxamacker/cbor/v2 v2.7.0-beta h1:m5bO941uTVpSms26QjzEJxUZaC3S/h1pSJexBCu4wAA= -github.com/fxamacker/cbor/v2 v2.7.0-beta/go.mod h1:pxXPTn3joSm21Gbwsv0w9OSA2y1HFR9qXEeXQVeNoDQ= +github.com/evanphx/json-patch v4.12.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= +github.com/fxamacker/cbor/v2 v2.6.0/go.mod h1:pxXPTn3joSm21Gbwsv0w9OSA2y1HFR9qXEeXQVeNoDQ= github.com/go-logr/logr v1.4.1 h1:pKouT5E8xu9zeFC39JXRDukb6JFQPXM5p5I91188VAQ= github.com/go-logr/logr v1.4.1/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= github.com/go-openapi/jsonpointer v0.19.6 h1:eCs3fxoIi3Wh6vtgmLTOjdhSpiqphQ+DaPn38N2ZdrE=