etcd icon indicating copy to clipboard operation
etcd copied to clipboard

fix dial-timeout not affected for client watch command

Open chengjoey opened this issue 1 year ago • 14 comments

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

chengjoey avatar Jul 16 '24 06:07 chengjoey

[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.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment Approvers can cancel approval by writing /approve cancel in a comment

k8s-ci-robot avatar Jul 16 '24 06:07 k8s-ci-robot

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.

k8s-ci-robot avatar Jul 16 '24 06:07 k8s-ci-robot

/ok-to-test

jmhbnz avatar Jul 16 '24 19:07 jmhbnz

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 data Powered 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.

codecov-commenter avatar Jul 16 '24 19:07 codecov-commenter

/test pull-etcd-unit-test-386 /test pull-etcd-unit-test-amd64 /test pull-etcd-e2e-amd64

chengjoey avatar Jul 17 '24 02:07 chengjoey

/retest-required

chengjoey avatar Jul 17 '24 02:07 chengjoey

@chengjoey are you able to troubleshoot these test failures on your own? Or do you need help?

jberkus avatar Jul 18 '24 18:07 jberkus

@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.

chengjoey avatar Jul 19 '24 01:07 chengjoey

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.

ahrtr avatar Jul 19 '24 12:07 ahrtr

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

chengjoey avatar Jul 20 '24 04:07 chengjoey

Just like e2e test does,newClient will set grpc.WithBlock https://github.com/etcd-io/etcd/blob/d6c0127d264d18255090b4a51e04c5b8e84d5a05/tests/e2e/utils.go#L50-L54

chengjoey avatar Jul 20 '24 05:07 chengjoey

Discussed during sig-etcd triage meeting, @chengjoey can you please rebase this to prepare it for review?

jmhbnz avatar Sep 26 '24 18:09 jmhbnz

Discussed during sig-etcd triage meeting, @chengjoey can you please rebase this to prepare it for review?

done

chengjoey avatar Sep 27 '24 01:09 chengjoey

/test pull-etcd-robustness-amd64

chengjoey avatar Sep 27 '24 02:09 chengjoey

Thanks for rebase, I'll review shortly, cc tech leads @ahrtr and @serathius to also review.

jmhbnz avatar Oct 24 '24 18:10 jmhbnz

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.

stale[bot] avatar Apr 26 '25 05:04 stale[bot]

@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.

k8s-ci-robot avatar May 24 '25 18:05 k8s-ci-robot

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.

github-actions[bot] avatar Jul 25 '25 00:07 github-actions[bot]

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.

github-actions[bot] avatar Sep 24 '25 00:09 github-actions[bot]

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.

github-actions[bot] avatar Nov 24 '25 00:11 github-actions[bot]