Skip to content

[public api] Enable gRPC reflection #10060

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

Merged
merged 1 commit into from
May 17, 2022

Conversation

andrew-farries
Copy link
Contributor

@andrew-farries andrew-farries commented May 17, 2022

Description

  • Add a WithReflection option to baseserver to allow enabling gRPC reflection.
  • Use WithReflection in the public API server.

EDIT: No WithReflection option in the baseserver anymore; it's just enabled with no option to toggle. See this comment.

Enabling reflection in the public api makes the API more discoverable and self documenting for consumers.

It also makes it easier for engineers to work with the API in development (using tools such as grpcurl and evans).

Related Issue(s)

Part of #7900

How to test

  1. Run the public-api-server:
cd components/public-api-server
go run .
  1. Use a gRPC CLI like evans to discover the services exposed by the API:
evans -p 9501 -r repl

Release Notes

Enable gRPC reflection for the public API

Documentation

None

@andrew-farries andrew-farries requested review from a team May 17, 2022 10:22
@github-actions github-actions bot added team: webapp Issue belongs to the WebApp team team: workspace Issue belongs to the Workspace team labels May 17, 2022
@easyCZ
Copy link
Member

easyCZ commented May 17, 2022

Imo, just enable it by default without the option. If we do end up needing configuration, we can always add it.

@jenting
Copy link
Contributor

jenting commented May 17, 2022

/werft run

👍 started the job as gitpod-build-af-enable-reflection-in-public-api-server.1
(with .werft/ from main)

@andrew-farries andrew-farries force-pushed the af/enable-reflection-in-public-api-server branch from ae99d94 to f9d32c8 Compare May 17, 2022 13:24
@roboquat roboquat added size/XS and removed size/S labels May 17, 2022
@andrew-farries
Copy link
Contributor Author

Imo, just enable it by default without the option. If we do end up needing configuration, we can always add it.

Done and rebased (and updated the PR description).

@roboquat roboquat merged commit 77ce184 into main May 17, 2022
@roboquat roboquat deleted the af/enable-reflection-in-public-api-server branch May 17, 2022 13:46
@roboquat roboquat added the deployed: webapp Meta team change is running in production label May 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
deployed: webapp Meta team change is running in production release-note size/XS team: webapp Issue belongs to the WebApp team team: workspace Issue belongs to the Workspace team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants