fix: Use driver for Spanner implementation#322
Closed
duwenxin99 wants to merge 7 commits into
Closed
Conversation
3edadf2 to
7d8140a
Compare
Contributor
Author
|
database/sql doesn't support user agent implementation |
jeffreyrubi
pushed a commit
to jeffreyrubi/genai-toolbox
that referenced
this pull request
Jun 7, 2025
## Problem In client-server messaging, the A2A protocol uses the [JSON-RPC 2.0](https://www.jsonrpc.org/specification) format, and the protocol specification is written using the [JSON-Schema specification](https://json-schema.org/). Fully complying with the standards can help validate the payloads more accurately and help better test different client and server implementations. In addition to making the A2A spec more compliant with the mentioned standards, changes in this PR are meant to fix a few minor bugs in the A2A protocol spec (mismatches from what was implemented in the sample A2A server and clients. Addresses issue googleapis#353. ## Summary of changes * Makes field "id" required on requests and responses. This field is important because, according to the JSON RPC 2.0 spec, a message that does not have an "id" is considered a notification, and the callee does not have to send a response to such requests. Similarly, without the "id" on the responses, the caller cannot correlate the responses to the pending requests, meaning that fully JSON-RPC-compliant clients would not be able to resolve such RPC calls. --- *Edit: clearer wording + add issue references* *Edit2: the scope of this PR has been reduced due to other updates fixing parts of the spec, summary items were edited to reflect what has already been addressed in other PRs.* --- ## (OLD) Summary of changes * Add a missing definition for "TaskSendParams.acceptedOutputModes" (described in googleapis#354). Fixed in googleapis#599. * Remove "default" values for "const" fields. Compliance with JSON schema, version `>=draft-6` and reduce ambiguity. https://json-schema.org/understanding-json-schema/reference/const Fixed in googleapis#599 * Make fields "jsonrpc" and "id" required on requests and responses. Compliance with JSON-RPC 2.0. * Make fields "error.code" and "error.message" required on errors. Fixed in googleapis#599. * In a few places, sort non-top-level dict keys to make them more aligned with the pydantic JSON schema outputs. Since now, we are discouraged from editing the spec manually, this item also drops out of the scope of our concerns. * The initial commit in this PR also included cleaning up several unnecessary "null" types, which were addressed more thoroughly in googleapis#352. ## (OLD) Additional notes While I sorted dictionaries within each model so that the keys of each model would be in the same order as the pydantic-based scripts' exports, at the same time, **I decided not to sort the top-level keys** (`$defs/ModelKey`). Because doing so would make the diff ugly and harder to read the applied changes. The top-level key sorting can be done afterward. --------- Co-authored-by: Holt Skinner <13262395+holtskinner@users.noreply.github.com> Co-authored-by: kthota-g <kcthota@google.com>
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.
Query()API. To support both read and write, we switch to Google Cloud Spanner Drivier