8000 Remove the deprecated `grpc.DialContext` · Issue #19772 · etcd-io/etcd · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Remove the deprecated grpc.DialContext #19772

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

Open
ahrtr opened this issue Apr 21, 2025 · 5 comments
Open

Remove the deprecated grpc.DialContext #19772

ahrtr opened this issue Apr 21, 2025 · 5 comments

Comments

@ahrtr
Copy link
Member
ahrtr commented Apr 21, 2025

What would you like to be added?

grpc.DialContext has already been deprecated, and NewClient is recommended to be used instead.

conn, err := grpc.DialContext(dctx, target, opts...)

https://github.com/grpc/grpc-go/blob/54e7e26a1f323438c1dad002f2af4ed6ed4c5f11/clientconn.go#L238-L239

Why is this needed?

ensure long-term compatibility with grpc-go

@fuweid do you have bandwidth to take care of this? thx

We might also want to backport the fix to release-3.6, depending on the complexity of the change.

cc @amosehiguese

also cc @dfawley please chime in in case we miss anything, thx

@ahrtr
Copy link
Member Author
ahrtr commented Apr 21, 2025

Link to #15145

@dfawley
Copy link
dfawley commented Apr 21, 2025

"Deprecated" does not mean it will be deleted, FYI, so consider this lower priority:

https://go.dev/wiki/Deprecated

In contrast to some other systems, an API feature being deprecated does not mean it is going to be removed in the future.

https://pkg.go.dev/google.golang.org/grpc#section-readme

Deprecated: use NewClient instead. Will be supported throughout 1.x.

It is tested and supported. But it has a misleading name and encourages bad practices, so it was marked as deprecated. It should be a higher priority to stop using gRPC's experimental APIs, which we do reserve the right to remove or change at any time.

@amosehiguese
Copy link
Contributor
amosehiguese commented Apr 23, 2025

@ahrtr

do I send a pr to align this accordingly or leave it to @fuweid?

It may just have a larger surface area.

@ahrtr
Copy link
Member Author
ahrtr commented Apr 23, 2025

@ahrtr

do I send a pr to align this accordingly?

Please let's revisit this after we finish #19785. Note that we need backport it to release-3.6 and 3.5. Eventually we can remove the metadata from main (3.7).

@amosehiguese
Copy link
Contributor

we need backport it to release-3.6 and 3.5.

Noted.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

3 participants
0