weaveworks / weave-gitops-enterprise

This repo provides the enterprise level features for the weave-gitops product, including CAPI cluster creation and team workspaces.
https://docs.gitops.weave.works/
Apache License 2.0
160 stars 30 forks source link

Spike: Investigate newer/better gRPC generation library #3539

Open jpellizzari opened 1 year ago

jpellizzari commented 1 year ago

Our gRPC gen library may be a bit old/stagnant. There may be other options out there, like this: https://buf.build/blog/protobuf-es-the-protocol-buffers-typescript-javascript-runtime-we-all-deserve

What we would want:

foot commented 1 year ago

Unfortunately the https://github.com/bufbuild/protobuf-es/issues/372#issuecomment-1403555349 does not support google.http annotations we use. So embracing that one in particular might require moving away from grpc-gateway which might be a lot.

Another option here might be generating TS clients/types from the openapiv2 definitions that are already generated from the protobufs.. there is quite an ecosystem of openapi -> clientgen stuff.

Can we go from go types to a protobuf definition? Skip the convertToBlah functions?

This would be really cool to address. I guess this is a pretty standard protobuf use case and might not be too hard? Doing it for libs we don't completely own might be tricker. Not sure.