-
Notifications
You must be signed in to change notification settings - Fork 4.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
Update docs and examples and tests to use NewClient
instead of Dial
#7049
Comments
@dfawley I would like to work on this issue |
Sounds good @silaselisha, that would be great -- we need to start only inside the repo for now, because we don't want to update any other documentation until our next release which includes the new function. Note that we can't just do a trivial |
@dfawley I'll start working on the |
To be specific, how to set timeout makes me confusing as this newclient function invoking WithTimeout in current test case which is marked as Deprecated... for details at #7093 |
Timeouts are not supported in If you need timeouts, feel free to keep using |
can we remove Deprecated on |
https://github.com/Hyperledger-TWGC/tape/actions/runs/8551020475/job/23429132147?pr=384#step:5:25
|
https://www.merriam-webster.com/dictionary/deprecate
"Deprecated" seems appropriate here. You should ideally stop using it, or update your linter if that's not possible. See also https://en.wikipedia.org/wiki/Deprecation:
|
For people who want to use Timeout with currently Hence, IMO, which means gprc is not going to support timeout feature any more? |
What practices exactly are you referring to? Do you have documentation that you can refer to? We will continue to test and support these functions. However, we don't recommend that you use them as they reinforce anti-patterns, hence they are marked as deprecated. |
.... ok I got the point. The current code comments guide me to I can use WithTimeout to return a DialOption.
to reduce confusing, please improve the comments, and remove the test case https://github.com/grpc/grpc-go/blob/master/clientconn_test.go#L390 as we are not going to support timeout feature. |
As I've said several times now, we are going to support the timeout feature. We simply recommend against its use (as we have for about as long as I've been the lead for gRPC-Go, 6+ years). We cannot delete tests for it, otherwise we'd risk breaking users when making changes. |
then, please, shall we make this test case without deprecated functions as Dial, WithTimeout, WithBlock? |
I don't know how to do what you're requesting. The only options are: 1. to remove "Deprecated" from the docstring of these functions, but we don't want to do that, as that's the way we notify users that they are not recommended; or 2. to not test these functions at all, but we can't do that, as we need tests to confirm they are working as intended. |
@purnesh42H assign to me |
Hi, I have been learning to use |
After #7010 we need to make sure all our documentation recommends
NewClient
. We should still retain some tests forDial
but the majority of them should probably be converted to useNewClient
as well.Tasks:
WithTimeout
/etc should keep using Dial).WithTimeout
specifically in the existing section aboutDial
.The text was updated successfully, but these errors were encountered: