Comments (12)
Bisected this to a8ef6e9
cc @wojtek-t
from kubernetes.
I'm not sure if this is the proper way to fix it, but setting a limit in the ListOptions deflakes the test.
Right, setting a limit when a resource version is set would delegate the list to etcd when cache is not initialized based on the KEP description.
It is due to this type of request is not that costly to etcd.
Perhaps in tests we could wait till the cache is ready in order to proceed?
Looks like it is exactly how the wait cache ready is added in https://github.com/kubernetes/kubernetes/pull/124642/files#diff-d82df65cc0625a3f621333245e76fbc801b579eedd3d266fe36eeb99366b5680.
See below
kubernetes/staging/src/k8s.io/apiserver/pkg/storage/cacher/cacher_test.go
Lines 472 to 479 in 9d8edca
So I think we should implement this same thing in newTestGenericStoreRegistry
when initializing the cacher
.
from kubernetes.
Agree - waiting for cacher to be initialized when creating it here is a better fix for it:
https://github.com/kubernetes/kubernetes/blob/22512e7a3c6db15ac7a9d46edfe4563fe561418f/staging/src/k8s.io/apiserver/pkg/registry/generic/registry/store_test.go#L2448C4-L2449C1
from kubernetes.
Exposing Wait(context) method sounds fine
from kubernetes.
This issue is currently awaiting triage.
If a SIG or subproject determines this is a relevant issue, they will accept it by applying the triage/accepted
label and provide further guidance.
The triage/accepted
label can be added by org members by writing /triage accepted
in a comment.
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.
from kubernetes.
/sig api-machinery
from kubernetes.
See also https://testgrid.k8s.io/sig-release-master-blocking#ci-kubernetes-unit
https://go.k8s.io/triage?pr=1&test=k8s.io%2Fapiserver%2Fpkg%2Fregistry%2Fgeneric
from kubernetes.
/sig etcd
from kubernetes.
/assign @serathius
/cc @wenjiaswe
from kubernetes.
I'm not sure if this is the proper way to fix it, but setting a limit in the ListOptions deflakes the test.
The flakiness comes from the fact that the cache is sometimes not initialized in time which causes it to return a "too many requests".
Perhaps in tests we could wait till the cache is ready in order to proceed?
from kubernetes.
I thought about this as well, but waiting on cacher.ready.wait()
is not possible outside of the cacher module, since it is a private field.
I'm thinking to either add an option WaitUntilReady
to cacherstorage.Config and make cacherstorage.NewCacherFromConfig
wait or add a new public method Wait(context.Context) error
to Cacher
.
Do you guys have a better idea? Thanks.
from kubernetes.
I have pushed the changes we discussed. Thank you all for your guidance.
from kubernetes.
Related Issues (20)
- ValidatingAdmissionPolicy: auditAnnotations are included in the audit event always HOT 4
- Better field-ordering when rendering YAML/JSON HOT 7
- AppArmor Profile not activated. #2310 HOT 6
- kube-controller-manager Master Election Time Exceeds the Lease Time HOT 7
- Pods gated by custom PreEnqueue plugins don't go through backoffQ even in case they ought to HOT 8
- [Flaking Test] gce-master-scale-correctness (Unexpected CSI call) HOT 10
- The PV may be in a Terminating state and cannot be deleted when the pod are created and then the pod and pvc are quickly force deleted . HOT 5
- DRA: kubelet: support permanent and transient errors HOT 4
- [Failing Test] CSI Mock volume storage capacity storage capacity unlimited HOT 3
- [Flaking test] [sig-cli] Kubectl client Simple pod should return command exit codes should handle in-cluster config HOT 1
- Add Limit and Continue to ListRestrictions on client-go HOT 7
- [Flaking test] TestPolicyAdmission/.v1.bindings/create HOT 1
- [FG:InPlacePodVerticalScaling] Pod Resize - resize stuck "InProgress" when only resizing memory requests HOT 8
- RuntimeHandlerResolver: interface invalid nil checking HOT 5
- When Deployment is editing replicas and strategy simultaneously, it may get stuck and not continue to execute HOT 3
- 1.31 Release Notes: "Known Issues" HOT 1
- Node reboot leaving existing pod using resources stuck with error UnexpectedAdmissionError HOT 5
- kube-apiserver oom, list resource consume too much memory cause json decode HOT 6
- Flaky test failure in staging/src/k8s.io/client-go/util/workqueue HOT 11
- client-go: fake.Clientset doesn't support streaming custom logs HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from kubernetes.