-
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
support "v1" of the reflection protocol, not just "v1alpha" #5684
Comments
@ejona86 @markdroth What is happening in grpc-java/c++ here? Do you support both versions? v1 was added to the grpc-proto repo 4 years ago, but we never picked it up in grpc-go. |
To my knowledge, no language is using v1. Carl added the v1 version, but nothing else happened with it. It's one of those "how is nobody complaining about this" things, while simultaneously being "things work fine." I do expect this will be painful in many languages, as the API used to register the service commonly only supports a single service. |
See also: grpc/grpc-java#6724 |
Requesting to take this one as a first-time contributor (in code) to grpc-go. (Still pumped from KubeCon NA 2022) |
@buzzsurfr SGTM, I think we can go ahead and support both v1 and v1alpha. |
As part of this change, it would also be good to fix our script which compiles the proto files. Currently we have a copy of this proto file in our repo. We are trying to get rid of this approach where we have a copy of the proto file in our repo, but instead want the |
@easwars Looking at the script, what's the difference between legacy sources (Generates sources without the embed requirement) and sources (Generates only the new gRPC Service symbols). What's the "embed requirement"? Lines 53 to 74 in 7f23df0
|
I did try moving v1alpha to use the protobuf from grpc-proto/grpc/reflection/v1alpha but it's missing a
I see that v1 has it--should I open a separate PR to add a similar line to v1alpha? |
That would be cool if you could do it. Thank you so much. |
From #5773:
Should there be two separate implementations--one for v1alpha and one for v1? I'm not sure how we can implement both without either changing the function names or swapping them out at some point. |
I think we will need one primary implementation and one wrapper implementation that adapts v1alpha requests & responses into v1 requests & responses. I think we can use
|
Sorry, one more thing: |
@dfawley Since we'd eventually want to move v1alpha to v1, should we instead wrap this into an interface and you can pass in either a v1alpha or v1 proto? |
IMO that's a fine implementation detail, but the important part is: we should make the |
@buzzsurfr : Just checking in to see if there is any update here. Thanks. |
I am trying to upgrade to latest grpc-go version and |
@yurishkuro you will need to work around this on your end. We will need to compile in v1alpha protos for a very long time (possibly even forever?) for compatibility with other versions of gRPC. Generally speaking, "deprecated" does not mean "should never be used", so these warnings from staticcheck should be advisory, not blocking. |
@dfawley yes, I've excluded the code path from the linter. But I do think the "deprecated" labeling is invalid, given that not only this "should be used" per your comment, but it's the only thing that can be used based on the code and comments above regarding usage in other languages. |
@dfawley, what's the status of this? Is it being worked on? Would you accept a patch? I've got a library that supports v1 from the client, and a corresponding "patch" for the server-side, for testing. I wonder if an approach like this would be acceptable: https://github.com/jhump/protoreflect/blob/v2/grpcreflect/client_test.go#L548 |
The server reflection service has a v1:
https://github.com/grpc/grpc/blob/master/src/proto/grpc/reflection/v1/reflection.proto
But this repo still only uses the v1alpha version.
Ideally, the implementation in the reflection sub-package would register implementations for both (or at least accept an option to do so). That would support a transition to the v1 API while still supporting clients that continue to use the v1alpha version.
The text was updated successfully, but these errors were encountered: