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

Support v1 of server reflection API #312

Open
akshayjshah opened this issue May 25, 2022 · 1 comment
Open

Support v1 of server reflection API #312

akshayjshah opened this issue May 25, 2022 · 1 comment

Comments

@akshayjshah
Copy link

Now that the server reflection schema is stable, it'd be great if grpcurl supported v1 in addition to v1alpha. The new proto schema is identical to the old one, so this should be as simple as trying the v1 URL and falling back to v1alpha if necessary — the remainder of the code can stay unchanged.

It looks like this is blocked on grpc-go shipping an equivalent of google.golang.org/grpc/reflection/grpc_reflection_v1alpha. Is that accurate, or could we make this change independently?

@jhump
Copy link
Contributor

jhump commented Oct 25, 2022

This change can be made independently. grpcurl uses github.com/jhump/protoreflect/grpcreflect under the hood, and that package now supports v1 of server reflection. With the latest version of that package, if using the new grpcreflect.NewClientAuto function, it will try using v1 first and then fallback to v1alpha.

There is no grpcreflect.NewClientV1 (to force use of v1) because, for symmetry with the similar method for v1alpha, it should directly accept a v1 stub. But there is no exported Go types for a stub at that version, so that part of the API is blocked on grpc-go shipping the newer version.

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

No branches or pull requests

2 participants