-
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
Confusing for NewClient in 1.63 #7093
Comments
Further more, Lines 126 to 290 in c31cec3
as NewClient is going to replace DialContext, |
Setting a timeout when creating a client is an anti-pattern, and is not possible in any other gRPC implementations. See https://github.com/grpc/grpc-go/blob/master/Documentation/anti-patterns.md#dialing-in-grpc for more info.
From which comments specifically? I'd like to cleanup the documentation as much as possible, so please let me know any places where you think it could be improved. |
@dfawley , I suppose you are not get my point. I am not query on anti-pattern, or say if we apply the lint checking to current code. I am not sure if anti-pattern still works as for example WithTimeout is marked as Deprecated and the impl https://github.com/grpc/grpc-go/blob/master/clientconn.go#L244-L262 for timeout feature seems not anti-pattern ? here are my steps, please go through them:
so... step further to learn from test case, https://github.com/grpc/grpc-go/blob/master/clientconn_test.go#L390 as https://github.com/grpc/grpc-go/blob/master/clientconn_test.go#L392 the WithTimeout is marked with Deprecated, the lint will fail, which not helpful. |
I'm not sure why you think it says you can use
Feel free to make your linter ignore these deprecated functions. We will not be removing them. But your best bet is to read and follow https://github.com/grpc/grpc-go/blob/master/Documentation/anti-patterns.md#dialing-in-grpc and stop using both If you have specific parts of the documentation that you can point to that need to be updated, I'd appreciate it. We can cover that in #7049. |
Please see the FAQ in our main README.md before submitting your issue.
NewClient
grpc-go/clientconn.go
Line 124 in c31cec3
but
grpc-go/dialoptions.go
Line 392 in c31cec3
hence, which means in 1.63 we Deprecated timeout support?
as I found this issue by lint Hyperledger-TWGC/tape#384
if I change to the NewClient following unit test case
grpc-go/clientconn_test.go
Line 390 in c31cec3
Any suggestion?
The text was updated successfully, but these errors were encountered: