🐛 Return error when object limit exceeded for cached list calls#3045
🐛 Return error when object limit exceeded for cached list calls#3045chhsia0 wants to merge 1 commit intokubernetes-sigs:mainfrom
Conversation
|
Welcome @chhsia0! |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: chhsia0 The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
Hi @chhsia0. Thanks for your PR. I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. DetailsInstructions 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. |
cc3ad86 to
65ed581
Compare
Since the cache does not implement strongly consistent paginated list calls, if the Limit option is set and the number of items listed exceeds this limit, there is no way for the caller to get a complete list of objects, so return an error here to notify the caller.
65ed581 to
3600637
Compare
alvaroaleman
left a comment
There was a problem hiding this comment.
/hold
This is a breaking change and breaks the use-case "Check if there are any objects of a given type". I agree the current behavior is subpar, but the new behavior would also be subpar but different and a breaking change so I am not in favor of merging this.
Alternate approaches:
- Add support for this into the upstream informer
- Return some sort of sentinel
continuetoken and error out if it is used
|
I think we can implement option 2. Or at least I don't see any downsides. It should reduce accidental usage of pagination |
|
/close |
|
@sbueringer: Closed this PR. DetailsIn response to this:
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. |
Since the cache does not implement strongly consistent paginated list calls, if the Limit option is set and the number of items listed exceeds this limit, there is no way for the caller to get a complete list of objects, so return an error here to notify the caller.
Fixes #3044.