yarpc / yarpc-go

A message passing platform for Go
MIT License
403 stars 101 forks source link

Compatibility with native gRPC #2101

Closed antstorm closed 2 years ago

antstorm commented 2 years ago

Hey,

I'm building an integration with a YARPC API (using gRPC transport and protobuf encoding). Unfortunately I can't use YARPC generated code since the language I'm using (Ruby) is not supported. I'm trying to connect using plain gRPC-generated definitions, but ran into some issues. I was able to manually set caller, service name and encoding using gRPC metadata, but I can't get past setting the correct procedure name:

GRPC::Unimplemented (12:unrecognized procedure "uber.cadence.api.v1.DomainAPI::ListDomains" for service "cadence-frontend". debug_error_string:{"created":"@1632661596.729831000","description":"Error received from peer ipv6:[::1]:7833","file":"src/core/lib/surface/call.cc","file_line":1070,"grpc_message":"unrecognized procedure "uber.cadence.api.v1.DomainAPI::ListDomains" for service "cadence-frontend"","grpc_status":12})

I tried using the rpc-caller-procedure header, but it seems like it's not taken into account the same way as other headers (such as rpc-caller and rpc-service).

Does anyone know what other manipulations I need to do to the native gRPC request to trick a YARPC server to accept it?

gopalchouhan commented 2 years ago
antstorm commented 2 years ago

@gopalchouhan thanks, I'll try to use yab to check if the server is configured properly (I assume it is, since it also has a Thrift/TChannel endpoint that I used before.

Can you please expand on how yarpc determines which procedure is being called?

antstorm commented 2 years ago

Ok, figured it out — the content type had to be proto, not application/proto. The error message could have been a bit more legible — maybe include the available procedures?

gopalchouhan commented 2 years ago

I believe error message is clear enough here. Given that issue look to be resolved, closing the issue.