Repository navigation
feat: support reflection-backed Triple IDL unary invocation - #1639
AsperforMias wants to merge 5 commits into
Conversation
robocanic
left a comment
There was a problem hiding this comment.
invokeIDLService loses the reflected type registry at the protobuf JSON boundary. For example, a provider can declare fixture.Payload in the reflected service file and return it inside a google.protobuf.Any. Both protojson calls here use the default global type registry, which does not contain the provider’s dynamic type. A valid request with this @type fails before dispatch; on the response path the RPC can succeed and Admin still returns an encoding error, potentially prompting the caller to repeat a completed operation.
I reproduced both codec failures with a private descriptor registry and type.googleapis.com/fixture.Payload. Using dynamicpb.NewTypes(files) as the Resolver on both UnmarshalOptions and MarshalOptions made both operations succeed. Please wire the resolver into both calls and add a unary echo regression with an Any carrying a reflected application type that is absent from protoregistry.GlobalTypes.
|
|
is there any problem unresolved? |



Please provide a description of this PR:
Support Triple IDL unary calls through the existing generic invoke API. The current Hessian-based path cannot construct the protobuf messages required by IDL services.
Determine IDL mode from service provider metadata bound to the selected instance. Resolve descriptors through server reflection, validate catalog input/output type names against the reflected method, and use dynamic protobuf messages with protobuf JSON encoding.
Keep legacy non-IDL metadata without ProviderAppName usable. Other applications' IDL modes do not affect the selected provider; conflicting or unknown modes within the bound provider set are rejected. Explicit IDL metadata without a matching instance binding is not used for invocation.
Reflection and invocation share one gRPC connection, closed on success, failure, or cancellation. Business calls preserve attachments and group/version routing headers; reserved attachment keys are rejected. Reflection requests do not carry business routing headers.
The implementation is unary-only, bounds descriptor retrieval, and rejects known TLS/authentication configurations that this path cannot configure. No dependencies or SDK versions are changed.
Validation:
Server reflection and bound IDL metadata are required. Streaming and TLS/authentication are not implemented. Reflection cannot distinguish divergent schemas for versions of the same service within one process. Java interoperability and UI validation remain unverified.
To help us figure out who should review this PR, please put an X in all the areas that this PR affects.
Please check any characteristics that apply to this pull request.