Skip to content
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 Go gRPC dependency #1191

Merged
merged 1 commit into from
Apr 24, 2024
Merged

Conversation

bestbeforetoday
Copy link
Member

@bestbeforetoday bestbeforetoday commented Apr 4, 2024

grpc.Dial() is (soon to be) deprecated in current gRPC versions. Use grpc.NewClient() instead.

@bestbeforetoday bestbeforetoday marked this pull request as ready for review April 4, 2024 18:42
@bestbeforetoday bestbeforetoday requested a review from a team as a code owner April 4, 2024 18:42
grpc.Dial() is (soon to be) deprecated in current gRPC versions. Use grpc.NewClient() instead.

Signed-off-by: Mark S. Lewis <Mark.S.Lewis@outlook.com>
Copy link
Contributor

@satota2 satota2 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hello @bestbeforetoday ,
Thank you for submitting this PR. I have a question about the NewClient() function. It seems like it would work just specifying localhost:port for the endpoint. Is there a specific need to include dns:///? Since 'dns' is used by default, I thought it might not be necessary to specify it explicitly. I'm not very familiar with the newer implementations of NewClient() in gRPC, so I would appreciate if you could share any practices or reasoning behind this choice.

Other that, LGTM!

@bestbeforetoday
Copy link
Member Author

If no URI scheme is specified, dns is used by default. The documentation does specify that the argument should be a URI and gives an example using the dns:/// prefix. We could omit the schema but I don’t think there is any harm in specifying the complete URI as intended.

Copy link
Contributor

@satota2 satota2 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bestbeforetoday
Thank you for your response. I understand now that specifying the schema explicitly is recommended in the documentation, so your code is appropriate.

@satota2 satota2 merged commit 42b9b60 into hyperledger:main Apr 24, 2024
41 checks passed
@bestbeforetoday bestbeforetoday deleted the grpc-newclient branch April 24, 2024 08:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants