Skip to content

Commit 9edabd6

Browse files
authored
Merge pull request kubernetes#126353 from liggitt/fix-vendor
Fix verify-vendor script to check all go.mod and go.sum files
2 parents b95f9c3 + aeb6074 commit 9edabd6

File tree

13 files changed

+33
-13
lines changed

13 files changed

+33
-13
lines changed

hack/verify-vendor.sh

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -62,15 +62,17 @@ popd > /dev/null 2>&1
6262
ret=0
6363

6464
pushd "${KUBE_ROOT}" > /dev/null 2>&1
65-
# Test for diffs
66-
if ! _out="$(diff -Naupr --ignore-matching-lines='^\s*\"GoVersion\":' go.mod "${_kubetmp}/go.mod")"; then
67-
echo "Your go.mod file is different:" >&2
68-
echo "${_out}" >&2
69-
echo "Vendor Verify failed." >&2
70-
echo "If you're seeing this locally, run the below command to fix your go.mod:" >&2
71-
echo "hack/update-vendor.sh" >&2
72-
ret=1
73-
fi
65+
# Test for diffs in go.mod / go.sum / go.work
66+
for file in $(git ls-files -cmo --exclude-standard -- ':!:vendor/*' ':(glob)**/go.mod' ':(glob)**/go.sum' ':(glob)**/go.work'); do
67+
if ! _out="$(diff -Naupr "${file}" "${_kubetmp}/${file}")"; then
68+
echo "Your ${file} file is different:" >&2
69+
echo "${_out}" >&2
70+
echo "Vendor Verify failed." >&2
71+
echo "If you're seeing this locally, run the below command to fix this:" >&2
72+
echo "hack/update-vendor.sh" >&2
73+
ret=1
74+
fi
75+
done
7476

7577
if ! _out="$(diff -Naupr -x "AUTHORS*" -x "CONTRIBUTORS*" vendor "${_kubetmp}/vendor")"; then
7678
echo "Your vendored results are different:" >&2

staging/publishing/rules.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2268,6 +2268,8 @@ rules:
22682268
branch: master
22692269
- repository: component-base
22702270
branch: master
2271+
- repository: component-helpers
2272+
branch: master
22712273
- repository: kms
22722274
branch: master
22732275
- repository: kubelet

staging/src/k8s.io/apiextensions-apiserver/go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ require (
1919
go.etcd.io/etcd/client/v3 v3.5.14
2020
go.opentelemetry.io/otel v1.28.0
2121
go.opentelemetry.io/otel/trace v1.28.0
22-
google.golang.org/genproto/googleapis/api v0.0.0-20240528184218-531527333157
2322
google.golang.org/grpc v1.65.0
2423
google.golang.org/protobuf v1.34.2
2524
gopkg.in/evanphx/json-patch.v4 v4.12.0
@@ -117,6 +116,7 @@ require (
117116
golang.org/x/time v0.3.0 // indirect
118117
golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d // indirect
119118
google.golang.org/genproto v0.0.0-20230822172742-b8732ec3820d // indirect
119+
google.golang.org/genproto/googleapis/api v0.0.0-20240528184218-531527333157 // indirect
120120
google.golang.org/genproto/googleapis/rpc v0.0.0-20240701130421-f6361c86f094 // indirect
121121
gopkg.in/inf.v0 v0.9.1 // indirect
122122
gopkg.in/natefinch/lumberjack.v2 v2.2.1 // indirect

staging/src/k8s.io/cli-runtime/go.mod

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ require (
5454
github.com/modern-go/reflect2 v1.0.2 // indirect
5555
github.com/monochromegane/go-gitignore v0.0.0-20200626010858-205db1a8cc00 // indirect
5656
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
57+
github.com/onsi/gomega v1.33.1 // indirect
5758
github.com/peterbourgon/diskv v2.0.1+incompatible // indirect
5859
github.com/pkg/errors v0.9.1 // indirect
5960
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect

staging/src/k8s.io/client-go/go.mod

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,9 @@ require (
4343
github.com/go-openapi/jsonpointer v0.19.6 // indirect
4444
github.com/go-openapi/jsonreference v0.20.2 // indirect
4545
github.com/go-openapi/swag v0.22.4 // indirect
46+
github.com/go-task/slim-sprig/v3 v3.0.0 // indirect
4647
github.com/google/btree v1.0.1 // indirect
48+
github.com/google/pprof v0.0.0-20240525223248-4bfdf5a9a2af // indirect
4749
github.com/josharian/intern v1.0.0 // indirect
4850
github.com/json-iterator/go v1.1.12 // indirect
4951
github.com/mailru/easyjson v0.7.7 // indirect
@@ -52,12 +54,13 @@ require (
5254
github.com/modern-go/reflect2 v1.0.2 // indirect
5355
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
5456
github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f // indirect
55-
github.com/onsi/gomega v1.33.1 // indirect
57+
github.com/onsi/ginkgo/v2 v2.19.0 // indirect
5658
github.com/pkg/errors v0.9.1 // indirect
5759
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
5860
github.com/x448/float16 v0.8.4 // indirect
5961
golang.org/x/sys v0.21.0 // indirect
6062
golang.org/x/text v0.16.0 // indirect
63+
golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d // indirect
6164
gopkg.in/inf.v0 v0.9.1 // indirect
6265
gopkg.in/yaml.v2 v2.4.0 // indirect
6366
gopkg.in/yaml.v3 v3.0.1 // indirect

staging/src/k8s.io/client-go/go.sum

Lines changed: 4 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

staging/src/k8s.io/code-generator/examples/go.sum

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

staging/src/k8s.io/component-base/go.mod

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ require (
5858
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
5959
github.com/modern-go/reflect2 v1.0.2 // indirect
6060
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
61+
github.com/onsi/gomega v1.33.1 // indirect
6162
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
6263
github.com/x448/float16 v0.8.4 // indirect
6364
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.28.0 // indirect

staging/src/k8s.io/component-helpers/go.mod

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ require (
3333
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
3434
github.com/modern-go/reflect2 v1.0.2 // indirect
3535
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
36+
github.com/onsi/gomega v1.33.1 // indirect
3637
github.com/pkg/errors v0.9.1 // indirect
3738
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
3839
github.com/x448/float16 v0.8.4 // indirect

staging/src/k8s.io/dynamic-resource-allocation/go.mod

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,14 @@ require (
99
github.com/go-logr/logr v1.4.2
1010
github.com/google/cel-go v0.20.1
1111
github.com/google/go-cmp v0.6.0
12+
github.com/onsi/gomega v1.33.1
1213
github.com/stretchr/testify v1.9.0
1314
google.golang.org/grpc v1.65.0
1415
k8s.io/api v0.0.0
1516
k8s.io/apimachinery v0.0.0
1617
k8s.io/apiserver v0.0.0
1718
k8s.io/client-go v0.0.0
19+
k8s.io/component-helpers v0.0.0
1820
k8s.io/klog/v2 v2.130.1
1921
k8s.io/kubelet v0.0.0
2022
k8s.io/utils v0.0.0-20240711033017-18e509b52bc8
@@ -82,6 +84,7 @@ replace (
8284
k8s.io/apiserver => ../apiserver
8385
k8s.io/client-go => ../client-go
8486
k8s.io/component-base => ../component-base
87+
k8s.io/component-helpers => ../component-helpers
8588
k8s.io/cri-api => ../cri-api
8689
k8s.io/dynamic-resource-allocation => ../dynamic-resource-allocation
8790
k8s.io/kms => ../kms

0 commit comments

Comments
 (0)