-
Notifications
You must be signed in to change notification settings - Fork 9.9k
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
Fix the issue of etcdserver crashing on receiving REST watch stream requests #19521
Conversation
49506af
to
1190df8
Compare
cc @fuweid |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted filessee 25 files with indirect coverage changes @@ Coverage Diff @@
## main #19521 +/- ##
==========================================
+ Coverage 68.77% 68.87% +0.10%
==========================================
Files 421 421
Lines 35901 35901
==========================================
+ Hits 24690 24727 +37
+ Misses 9782 9750 -32
+ Partials 1429 1424 -5 Continue to review full report in Codecov by Sentry.
|
…EST watch requests Signed-off-by: Benjamin Wang <benjamin.ahrtr@gmail.com>
1190df8
to
6569111
Compare
Signed-off-by: Benjamin Wang <benjamin.ahrtr@gmail.com>
Executed ./scripts/genproto.sh Signed-off-by: Benjamin Wang <benjamin.ahrtr@gmail.com>
Signed-off-by: Benjamin Wang <benjamin.ahrtr@gmail.com>
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.
🤞🏻
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 on green. Thanks, @ahrtr.
defer epc.Close() | ||
|
||
curlCmdAndArgs := e2e.CURLPrefixArgsCluster(epc.Cfg, epc.Procs[0], "POST", e2e.CURLReq{Endpoint: "/v3/watch", Timeout: 3}) | ||
for i := 0; i < 10; i++ { |
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.
This can be simplified to
for i := 0; i < 10; i++ { | |
for i := range 10 { |
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.
It's not a big deal, let's just keep it as it's. I really don't want to wait another 1 hour to backport this PR, thx
@jmhbnz @serathius we still need one approver to approve this PR. |
also cc @spzala |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: ahrtr, ivanvc, johanbrandhorst, serathius, spzala 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 |
Thanks @ahrtr !! |
_ = curlProc.Signal(syscall.SIGKILL) | ||
_ = curlProc.Close() |
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.
Note: I intentionally do not check the error, because they may fail for known reason. The curlProc.Close()
will most likely fail because the curl command is an invalid command, because there is NO request body.
The purpose of this test is to verify etcdserver don't crash when receiving even invalid requests.
Thanks all for the quick review. |
/cherry-pick release-3.6 |
@ahrtr: #19521 failed to apply on top of branch "release-3.6":
In 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. |
Let me manually backport this PR to release-3.6. |
Reproduce #19509
Once grpc-gateway v2.26.3 is out, then I will bump it as the second commit in this PR.
cc @ivanvc @johanbrandhorst @Totktonada
Please read https://github.com/etcd-io/etcd/blob/main/CONTRIBUTING.md#contribution-flow.