-
Notifications
You must be signed in to change notification settings - Fork 39.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Avoid going back in time in Reflector relist (revived) #83520
Conversation
c19926d
to
d5877fe
Compare
d5877fe
to
79d247f
Compare
/test pull-kubernetes-integration |
79d247f
to
14a08d2
Compare
/cc @yliaog |
This is causing real issues with reflector ListAndWatch in TestCRDDeletionCascading. Investigating. |
14a08d2
to
a6678d2
Compare
Code updated to handle HTTP 410 (Gone) status code responses correctly and to start with an initial list using resourceVersion="". I need to update the tests still. |
a6678d2
to
09230a1
Compare
Test failures should all be fixed now. This is ready for review. @smarterclayton, this should solve both of the problems that caused stale reads |
Test was failing because it expected |
Looks like the _output_tests folder accidentally got committed edit: actually, looks like a bunch of random changes got added under vendor |
89598ff
to
e2fe126
Compare
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: jpbetz, smarterclayton The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
heh, git failed me. That was a from a git add of a single file. The fun part was after that:
had to back out the commit and nuke my |
/lgtm |
/hold cancel |
(This is a based on #67998. It applies the fix @liggitt suggested in #67998 (comment), also addresses component restart and test coverage.)
Fixes the relist part of #59848
Update reflectors to relist with resourceVersion="{newest resource version observed}", falling back to resourceVersion="" if an HTTP 410 (Gone) status code is returned by the relist request. This ensures the reflector never "goes back in time" while running.
The pager was also modified to only fallback to a full list if an "Expired" error is returned on page 2 or later. This is to avoid needless reattempts of "too old" requests. See comment in code explaining rationale.
/sig api-machinery
/kind bug
/priority important-soon
@liggitt @wojtek-t @smarterclayton