Skip to content

Commit de39b8d

Browse files
Merge pull request #130899 from serathius/watchcache-error
Implement watchcache returning error from etcd that caused cache reinitialization Kubernetes-commit: e5558a81c93fef5463b02ae7c2a8c0c4b15ecc3a
2 parents 7022eab + 58ab281 commit de39b8d

File tree

3 files changed

+10
-14
lines changed

3 files changed

+10
-14
lines changed

go.mod

+3-3
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,9 @@ require (
2525
google.golang.org/grpc v1.68.1
2626
google.golang.org/protobuf v1.36.5
2727
gopkg.in/evanphx/json-patch.v4 v4.12.0
28-
k8s.io/api v0.0.0-20250319053034-feb95d943ada
29-
k8s.io/apimachinery v0.0.0-20250319052758-7e8c77e774c9
30-
k8s.io/apiserver v0.0.0-20250319055236-7db8aee1f8da
28+
k8s.io/api v0.0.0-20250319173043-fc83166ea9db
29+
k8s.io/apimachinery v0.0.0-20250319092800-e8a77bd768fd
30+
k8s.io/apiserver v0.0.0-20250319174535-a581683e3c9f
3131
k8s.io/client-go v0.0.0-20250319053412-169f1af1bf07
3232
k8s.io/code-generator v0.0.0-20250319054337-cf96b4569612
3333
k8s.io/component-base v0.0.0-20250319054524-7c899b094d78

go.sum

+6-6
Original file line numberDiff line numberDiff line change
@@ -362,12 +362,12 @@ gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
362362
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
363363
honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
364364
honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
365-
k8s.io/api v0.0.0-20250319053034-feb95d943ada h1:jkgp/vD+5CoL2n17AMKQ3g3ELsKmn+zBDXqwvpPvmXw=
366-
k8s.io/api v0.0.0-20250319053034-feb95d943ada/go.mod h1:MsIjX9SIqRiiwfw1r0s0lMHaMw6jhSX8h4VjblK393I=
367-
k8s.io/apimachinery v0.0.0-20250319052758-7e8c77e774c9 h1:vw/UFDFjwXc5W6nMCOUmIaFX19fkQ720CygFuZOS9jM=
368-
k8s.io/apimachinery v0.0.0-20250319052758-7e8c77e774c9/go.mod h1:D2UW665TVSpInyOuG6C+PMtC1MZheP0KQz65UPQEiI4=
369-
k8s.io/apiserver v0.0.0-20250319055236-7db8aee1f8da h1:ukL/kss7UP7eU8bCxB8xp/h7Quxu5GCoq0Sab/mnxN0=
370-
k8s.io/apiserver v0.0.0-20250319055236-7db8aee1f8da/go.mod h1:KQWaIY+clyZ1mHi1UaqaPHjnA5VttUc5PiJPH/u8Pbw=
365+
k8s.io/api v0.0.0-20250319173043-fc83166ea9db h1:x+vYK/B3vjbtoBztfSz0rXHiGAMmVgEeqO1HtBGkxuo=
366+
k8s.io/api v0.0.0-20250319173043-fc83166ea9db/go.mod h1:JO0tyTI0qSXXaGVhLdqwfi3RMbS2g9hcYvzBmZP5wVk=
367+
k8s.io/apimachinery v0.0.0-20250319092800-e8a77bd768fd h1:KoXgjwEokLM8o95kMxowg5vp5iQ4v46Kk+zobsqeTgU=
368+
k8s.io/apimachinery v0.0.0-20250319092800-e8a77bd768fd/go.mod h1:D2UW665TVSpInyOuG6C+PMtC1MZheP0KQz65UPQEiI4=
369+
k8s.io/apiserver v0.0.0-20250319174535-a581683e3c9f h1:Vk1jR1FK2GltlnpNYWwhSvyfFjpMNadw2shWnNbNZBE=
370+
k8s.io/apiserver v0.0.0-20250319174535-a581683e3c9f/go.mod h1:xKB9IyVeZJFZaok+XF3CuQtIY5v5C3iZbJphtqaMNW8=
371371
k8s.io/client-go v0.0.0-20250319053412-169f1af1bf07 h1:UmlJkL72Xyrfs30rqXWtVUcjV15AeOggxctLIiKuNsE=
372372
k8s.io/client-go v0.0.0-20250319053412-169f1af1bf07/go.mod h1:a4HxhGqHxxHlQQTrtis+Srk1+UsPuKeUlZtQAYq34bU=
373373
k8s.io/code-generator v0.0.0-20250319054337-cf96b4569612 h1:JlqBuQF3kYor9PwmSz+/IwaW26n0p5ngHtttVGZQITE=

test/integration/conversion/conversion_test.go

+1-5
Original file line numberDiff line numberDiff line change
@@ -686,18 +686,14 @@ func expectConversionFailureMessage(id, message string) func(t *testing.T, ctc *
686686
objv1beta2 := newConversionMultiVersionFixture(ns, id, "v1beta2")
687687
meta, _, _ := unstructured.NestedFieldCopy(obj.Object, "metadata")
688688
unstructured.SetNestedField(objv1beta2.Object, meta, "metadata")
689-
lastRV := objv1beta2.GetResourceVersion()
690689

691690
for _, verb := range []string{"get", "list", "create", "update", "patch", "delete", "deletecollection"} {
692691
t.Run(verb, func(t *testing.T) {
693692
switch verb {
694693
case "get":
695694
_, err = clients["v1beta2"].Get(context.TODO(), obj.GetName(), metav1.GetOptions{})
696695
case "list":
697-
// With ResilientWatchcCacheInitialization feature, List requests are rejected with 429 if watchcache is not initialized.
698-
// However, in some of these tests that install faulty converter webhook, watchcache will never initialize by definition (as list will never succeed due to faulty converter webook).
699-
// In such case, the returned error will differ from the one returned from the etcd, so we need to force the request to go to etcd.
700-
_, err = clients["v1beta2"].List(context.TODO(), metav1.ListOptions{ResourceVersion: lastRV, ResourceVersionMatch: metav1.ResourceVersionMatchExact})
696+
_, err = clients["v1beta2"].List(context.TODO(), metav1.ListOptions{})
701697
case "create":
702698
_, err = clients["v1beta2"].Create(context.TODO(), newConversionMultiVersionFixture(ns, id, "v1beta2"), metav1.CreateOptions{})
703699
case "update":

0 commit comments

Comments
 (0)