Fix GoogleRPCStatus encoding/decoding#58
Merged
Conversation
Motivation: The 'rich' error model packs a google.rpc.status protobuf message into the trailing metadata of an RPC. This should just be the base64 encoded bytes of the serialzed message. At the moment this is packed within a google.protobuf.any and then added to the metadata which doesn't interop well with other languages. Modifications: - Remove the indirection - Add methods for serializing/deserializing the RPC status wrapper Result: Better interop
gjcairo
reviewed
Apr 9, 2025
| /// fields. | ||
| /// - partial: If `false` (the default), this method will check if the `Message` | ||
| /// is initialized after decoding to verify that all required fields are present. | ||
| /// If any are missing, this method throws `BinaryDecodingError`. |
Collaborator
There was a problem hiding this comment.
Should we be making promises in the docs about the type of the error we're throwing? Can't we use typed throws instead, or omit it?
Collaborator
Author
There was a problem hiding this comment.
Good question. These are from the protobuf docs and we're really just wrapping the protobuf call so I think it's okay. We shouldn't use typed throws as that paints us into a corner (also, protobuf doesn't use it) if the error type does change.
gjcairo
approved these changes
Apr 9, 2025
dongjoon-hyun
added a commit
to apache/spark-connect-swift
that referenced
this pull request
Apr 18, 2025
…O Transport` to 1.0.3 ### What changes were proposed in this pull request? This PR aims to upgrade `gRPC Swift Protobuf` to 1.2.0 and `gRPC Swift NIO Transport` to 1.0.3. ### Why are the changes needed? To bring the latest bug fixes. - https://github.com/grpc/grpc-swift-protobuf/releases/tag/1.2.0 - grpc/grpc-swift-protobuf#58 - https://github.com/grpc/grpc-swift-nio-transport/releases/tag/1.0.3 ### Does this PR introduce _any_ user-facing change? No, there is no behavior change. ### How was this patch tested? Pass the CIs. ### Was this patch authored or co-authored using generative AI tooling? No. Closes #71 from dongjoon-hyun/SPARK-51846. Authored-by: Dongjoon Hyun <dongjoon@apache.org> Signed-off-by: Dongjoon Hyun <dongjoon@apache.org>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation:
The 'rich' error model packs a google.rpc.status protobuf message into the trailing metadata of an RPC. This should just be the base64 encoded bytes of the serialzed message. At the moment this is packed within a google.protobuf.any and then added to the metadata which doesn't interop well with other languages.
Modifications:
Result:
Better interop