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 grpc reflection on APIs #8551

Merged
merged 1 commit into from
Jul 28, 2021
Merged

Conversation

choo-stripe
Copy link
Contributor

Signed-off-by: Josh Chorlton [email protected]

Description

Just registers the grpc server in servenv as part of the reflection API. This should allow us to run grpcurl ... list.

It's just a nice-to-have convenience thing. It's more useful as vitess combines servers into a single entrypoint with servers activated by flag, so we can trivially tell what RPCs are available without digging through source.

Related Issue(s)

N/A

Checklist

  • [ x] Tests were added or are not required
  • [ x] Documentation was added or is not required

Deployment Notes

I'd appreciate some help testing this. I tried to get a quick vitess server up and running just to make sure it didn't crash on boot. I couldn't find instructions, and couldn't find a grpc server that was trivial to start without e.g. a valid topo-srv running. Is there a good way to test this without hacking about in docker compose or other and getting the whole stack running?

Signed-off-by: Josh Chorlton <[email protected]>
@choo-stripe choo-stripe requested a review from deepthi as a code owner July 27, 2021 14:39
@deepthi deepthi requested a review from vmg July 27, 2021 16:22
@vmg
Copy link
Collaborator

vmg commented Jul 28, 2021

Looking gucci. 👌

vmg@pop-os ~ [1]> grpcurl -plaintext localhost:15991 list
grpc.reflection.v1alpha.ServerReflection
vtgateservice.Vitess
vmg@pop-os ~> grpcurl -plaintext localhost:15991 list vtgateservice.Vitess
vtgateservice.Vitess.Execute
vtgateservice.Vitess.ExecuteBatch
vtgateservice.Vitess.ResolveTransaction
vtgateservice.Vitess.StreamExecute
vtgateservice.Vitess.VStream
vmg@pop-os ~ [1]> grpcurl -plaintext localhost:15991 describe vtgateservice.Vitess.Execute
vtgateservice.Vitess.Execute is a method:
rpc Execute ( .vtgate.ExecuteRequest ) returns ( .vtgate.ExecuteResponse );

@vmg vmg added Component: Query Serving Type: Enhancement Logical improvement (somewhere between a bug and feature) labels Jul 28, 2021
@vmg vmg merged commit 412775d into vitessio:main Jul 28, 2021
@vmg
Copy link
Collaborator

vmg commented Jul 28, 2021

@choo-stripe: in the future you can use the examples/local folder to set up a tiny Vitess deployment in your machine without using containers or anything. Very useful for testing! https://github.com/vitessio/vitess/tree/main/examples/local

@choo-stripe
Copy link
Contributor Author

@choo-stripe: in the future you can use the examples/local folder to set up a tiny Vitess deployment in your machine without using containers or anything. Very useful for testing! https://github.com/vitessio/vitess/tree/main/examples/local

Oh, rad, TIL. This is exactly what I was looking for. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: Query Serving Type: Enhancement Logical improvement (somewhere between a bug and feature)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants