etcd
etcd copied to clipboard
fix dial-timeout not affected for client watch command
fix #18335
https://github.com/etcd-io/etcd/blob/e7f572914d79f0705b3dc8ca28d9a14b0f854d49/client/v3/client.go#L327-L330
As noted before, it is wrong to not have grpc.WithBlock()
in the test, we will also addoption grpc.WithBlock(
https://github.com/etcd-io/etcd/blob/e7f572914d79f0705b3dc8ca28d9a14b0f854d49/client/v3/client_test.go#L104-L118
[APPROVALNOTIFIER] This PR is NOT APPROVED
This pull-request has been approved by: chengjoey Once this PR has been reviewed and has the lgtm label, please assign wenjiaswe for approval. For more information see the Kubernetes Code Review Process.
The full list of commands accepted by this bot can be found here.
Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment
Hi @chengjoey. Thanks for your PR.
I'm waiting for a etcd-io member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.
Once the patch is verified, the new status will be reflected by the ok-to-test label.
I understand the commands that are listed here.
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.
/ok-to-test
Codecov Report
:x: Patch coverage is 0% with 14 lines in your changes missing coverage. Please review.
:white_check_mark: Project coverage is 68.77%. Comparing base (c86c93c) to head (edae2a1).
:warning: Report is 2246 commits behind head on main.
:warning: Current head edae2a1 differs from pull request most recent head 3d8fe91
Please upload reports for the commit 3d8fe91 to get more accurate results.
| Files with missing lines | Patch % | Lines |
|---|---|---|
| etcdctl/ctlv3/command/global.go | 0.00% | 13 Missing :warning: |
| etcdctl/ctlv3/command/watch_command.go | 0.00% | 1 Missing :warning: |
Additional details and impacted files
| Files with missing lines | Coverage Δ | |
|---|---|---|
| etcdctl/ctlv3/command/watch_command.go | 44.08% <0.00%> (ø) |
|
| etcdctl/ctlv3/command/global.go | 0.00% <0.00%> (ø) |
... and 24 files with indirect coverage changes
@@ Coverage Diff @@
## main #18336 +/- ##
=======================================
Coverage 68.77% 68.77%
=======================================
Files 420 420
Lines 35535 35548 +13
=======================================
+ Hits 24438 24449 +11
- Misses 9668 9673 +5
+ Partials 1429 1426 -3
Continue to review full report in Codecov by Sentry.
Legend - Click here to learn more
Δ = absolute <relative> (impact),ø = not affected,? = missing dataPowered by Codecov. Last update c86c93c...3d8fe91. Read the comment docs.
:rocket: New features to boost your workflow:
- :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
/test pull-etcd-unit-test-386 /test pull-etcd-unit-test-amd64 /test pull-etcd-e2e-amd64
/retest-required
@chengjoey are you able to troubleshoot these test failures on your own? Or do you need help?
@chengjoey are you able to troubleshoot these test failures on your own? Or do you need help?
thanks @jberkus , i will troubleshoot the test failure in the next two days.
Thanks for raising this PR.
It's a valid fix, but it might break some of the existing user experience. I guess it might be the reason why some test cases failed. So I suggest to only fix this in main.
updates:
Modifying the original logic and adding Option grpc.WithBlock will indeed affect the old logic. For example, grpc_proxy must create a client before starting the server. At this time, setting Block will cause the server to never start.
https://github.com/etcd-io/etcd/blob/010d462c0ff03a70f5c5fd32efbb76ad4c1e7c81/server/etcdmain/grpc_proxy.go#L239-L269
So I changed it to only watch_command to set the block when creating the client, and other commands remain the same. This will only fix the watch dial-timeout, and will not affect other logic @ahrtr @jberkus PTAL
Just like e2e test does,newClient will set grpc.WithBlock
https://github.com/etcd-io/etcd/blob/d6c0127d264d18255090b4a51e04c5b8e84d5a05/tests/e2e/utils.go#L50-L54
Discussed during sig-etcd triage meeting, @chengjoey can you please rebase this to prepare it for review?
Discussed during sig-etcd triage meeting, @chengjoey can you please rebase this to prepare it for review?
done
/test pull-etcd-robustness-amd64
Thanks for rebase, I'll review shortly, cc tech leads @ahrtr and @serathius to also review.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed after 21 days if no further activity occurs. Thank you for your contributions.
@chengjoey: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:
| Test name | Commit | Details | Required | Rerun command |
|---|---|---|---|---|
| ci-etcd-robustness-release36-amd64 | 3d8fe917f9c36ae4cc4d02f534706b106f02e8b6 | link | true | /test ci-etcd-robustness-release36-amd64 |
Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR.
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. I understand the commands that are listed here.
This pull request has been automatically marked as stale because it has not had recent activity. It will be closed after 21 days if no further activity occurs. Thank you for your contributions.
This pull request has been automatically marked as stale because it has not had recent activity. It will be closed after 21 days if no further activity occurs. Thank you for your contributions.
This pull request has been automatically marked as stale because it has not had recent activity. It will be closed after 21 days if no further activity occurs. Thank you for your contributions.