-
Notifications
You must be signed in to change notification settings - Fork 9.8k
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
client: enhance the function shouldRetryWatch and added unit test #14935
Conversation
Signed-off-by: Benjamin Wang <[email protected]>
0845b67
to
4437ce1
Compare
…gGRPCAuthOldRevision to cache gRPC error messages Signed-off-by: Benjamin Wang <[email protected]>
4437ce1
to
d0e753c
Compare
Codecov Report
@@ Coverage Diff @@
## main #14935 +/- ##
==========================================
- Coverage 74.59% 74.57% -0.02%
==========================================
Files 415 415
Lines 34338 34339 +1
==========================================
- Hits 25613 25608 -5
- Misses 7082 7084 +2
- Partials 1643 1647 +4
Flags with carried forward coverage won't be shown. Click here to find out more.
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks for enhancing it @ahrtr
Probably I won't be able to have time for following the k8s side discussion until weekend... sorry for that. I think having something like |
name: "invalid grpc error and not equal to ErrGRPCInvalidAuthToken or ErrGRPCAuthOldRevision", | ||
msg: "whatever error message", | ||
expectedRetry: false, | ||
}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Now msg: "" is a special codepath - so probably worth having a testcase.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Eventually we need to revert the change and need to add a field something like ReasonCode
in the WatchResponse
. Or just rollback the change, do not fix it at all. What's your thought?
Resolve the comment kubernetes/kubernetes#114403 (comment)
Signed-off-by: Benjamin Wang [email protected]
Please read https://github.com/etcd-io/etcd/blob/main/CONTRIBUTING.md#contribution-flow.
cc @mitake @spzala