feat: add EchoErrorDetails RPC returning error.details as field type google.protobuf.Any #1385
Conversation
This can be used to test that we properly handle google.protobuf.Any, particularly over REST transport.
|
Interesting. The CI failures do not seem to be caused by my changes, but how else would they have sneaked in? And yet at first glance I'm not seeing the erroring source, and even the |
noahdietz
left a comment
There was a problem hiding this comment.
I'm not quite sure how this is different from using the standard Echo request with the error field set. My guess is that this focuses on the Any being in the response body as opposed to the Status returned? If so, why not just put some fields on Echo to funnel the response through Any? e.g. (forgive the names) EchoRequest.any_response_enabled and EchoResponse.any_content (could be repeated).
|
Yes, the big difference is that these RPCs use As to changing existing RPCs to use the Extending the current Another option is that I could combine the two RPCs currently in the PR into a single RPC, where the request has two fields to signal a single error detail or multiple, and the response changes accordingly. That might be slightly simpler, though it would involve an additional level of nesting in the response since we want the path to both singular and repeated details to end with WDYT? |
Sorry, this is throwing me. So REGAPIC is supposed to only allow
It should be using the I understand wanting to add bespoke RPCs to not overload the existing one, and we definitely split I'm just not sure what is actually being tested here. If it is just that REGAPICs can handle an |
|
As a result of an out-of-band conversation with @noahdietz , I corrected/clarified the PR description to better describe the motivation for this PR. I will also work on combining the two new RPCs into one for simplicity. |
|
Consolidated what were formerly two RPCs into a single one. Update PR title and description to match. Still need to investigate the CI errors. |
🤖 I have created a release *beep* *boop* --- ## [0.29.0](https://togithub.com/googleapis/gapic-showcase/compare/v0.28.4...v0.29.0) (2023-11-08) ### Features * Add EchoErrorDetails RPC for Any testing ([#1385](https://togithub.com/googleapis/gapic-showcase/issues/1385)) ([c839a8e](https://togithub.com/googleapis/gapic-showcase/commit/c839a8ec6973b6c5189c9cba8b6a81f1663b8fd1)) --- This PR was generated with [Release Please](https://togithub.com/googleapis/release-please). See [documentation](https://togithub.com/googleapis/release-please#release-please).
This is motivated by #1577, where the CI action to re-generate sources appears to not be running. This includes changes from even before #1385. See comment #1577 (comment)
This is motivated by #1577, where the CI action to re-generate sources appears to not be running. This includes changes from even before #1385. See comment #1577 (comment)

In the DIREGAPIC flow (
rest-transport clients generated from synthetic protos emitted by https://github.com/googleapis/disco-to-proto3-converter from public Discovery documents) currently used for the Google Compute Engine GAPIC, we only allowgoogle.protobuf.Anytypes for fields whose paths end in.error.details. The actual types at run-time must be one of the types ingoogle/rpc/error_details.proto. Sinceerror_details.protois not explicitly included in the synthetic GCE protos or the Showcase protos, we want to ensure that GAPICs in all languages can successfully decode theseerror_details.protomessages in a language-appropriate manner.This change implements an RPC
EchoErrorDetails()that adds such anAny-type field to the schema and return such an allowederror_details.protoactual value from the server. This can be used to verify that generated GAPICs can indeed processAnyfields whose actual types are those inerror_details.proto.The new server functionality can be tested from the command line via the following:
(This change is motivated by googleapis/disco-to-proto3-converter#102, which adds support for
Anyfields only in....error.details.)