Skip to content

fix: Use driver for Spanner implementation#322

Closed
duwenxin99 wants to merge 7 commits into
mainfrom
spanner-drive
Closed

fix: Use driver for Spanner implementation#322
duwenxin99 wants to merge 7 commits into
mainfrom
spanner-drive

Conversation

@duwenxin99

@duwenxin99 duwenxin99 commented Mar 10, 2025

Copy link
Copy Markdown
Contributor
  1. Spanner client library only supports read transactions for the Query() API. To support both read and write, we switch to Google Cloud Spanner Drivier
  2. Change Spanner integration test to run generic test suite.

@duwenxin99 duwenxin99 requested a review from a team March 10, 2025 19:16
@duwenxin99 duwenxin99 changed the title feat: Use driver for Spanner implementation fix: Use driver for Spanner implementation Mar 10, 2025
@duwenxin99

Copy link
Copy Markdown
Contributor Author

database/sql doesn't support user agent implementation

@duwenxin99 duwenxin99 closed this Apr 5, 2025
@duwenxin99 duwenxin99 deleted the spanner-drive branch June 5, 2025 19:07
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant