-
Notifications
You must be signed in to change notification settings - Fork 14
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
fix!: address all gRPC deprecations #22
Merged
Merged
+92
−75
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
maxbrunet
force-pushed
the
fix/grpc-deprecations
branch
2 times, most recently
from
July 6, 2024 18:14
5348131
to
763552b
Compare
DmitriyMV
reviewed
Jul 8, 2024
DmitriyMV
requested changes
Jul 8, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we can remove encoding.RegisterCodec(proxy.Codec())
entirely.
maxbrunet
force-pushed
the
fix/grpc-deprecations
branch
2 times, most recently
from
July 8, 2024 17:54
6828407
to
12d908a
Compare
This addresses all deprecation warnings from `grpc-go` in tests and examples (e.g. use `NewClient` instead of `DialContext`, the context from `DialContext` was only useful if the [`grpc.WithBlock()`] option was used, this is also deprecated) The only exceptions is the change in `proxy/codec.go` to implement `encoding.Codec` instead `grpc.Codec` which is a breaking change. The clients must now use `grpc.NewClient` with the `grpc.WithDefaultCallOptions(grpc.ForceCodec(proxy.Codec()))` option. And servers must now use `grpc.NewServer` `encoding.RegisterCodec(proxy.Codec())` `grpc.ForceServerCodec(proxy.Codec())` option. [`grpc.WithBlock()`]: https://pkg.go.dev/google.golang.org/grpc#WithBlock Signed-off-by: Maxime Brunet <max@brnt.mx> Signed-off-by: Dmitriy Matrenichev <dmitry.matrenichev@siderolabs.com>
DmitriyMV
force-pushed
the
fix/grpc-deprecations
branch
from
July 8, 2024 23:32
12d908a
to
ec3b59c
Compare
DmitriyMV
approved these changes
Jul 8, 2024
Updated the commit and commit/PR message. |
DmitriyMV
approved these changes
Jul 8, 2024
/m |
@maxbrunet congrats this is now merged. |
Thank you @DmitriyMV! Any chance you could tag a release, please? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This addresses all deprecation warnings from
grpc-go
in tests and examples (e.g. useNewClient
instead ofDialContext
, the context fromDialContext
was only useful if thegrpc.WithBlock()
option was used, this is also deprecated)The only exceptions is the change in
proxy/codec.go
to implementencoding.Codec
insteadgrpc.Codec
which is a breaking change.The clients must now use
grpc.NewClient
with thegrpc.WithDefaultCallOptions(grpc.ForceCodec(proxy.Codec()))
option. And servers must now usegrpc.NewServer
encoding.RegisterCodec(proxy.Codec())
grpc.ForceServerCodec(proxy.Codec())
option.Happy to look into a solution without breaking change if it is not acceptable :)
Closes #13