Skip to content

feat: add support for experimental host#1452

Merged
rahul2393 merged 6 commits intogoogleapis:mainfrom
sagnghos:sagnghos/experimentalHost
Nov 6, 2025
Merged

feat: add support for experimental host#1452
rahul2393 merged 6 commits intogoogleapis:mainfrom
sagnghos:sagnghos/experimentalHost

Conversation

@sagnghos
Copy link
Contributor

@sagnghos sagnghos commented Oct 29, 2025

  • The changes make the python client compatible with experimental host over plain text communication.
  • The changes also ensure that the integration testing framework of python client is compatible with experimental host.

The support for tls and mTLS will be added via future PRs

@sagnghos sagnghos requested a review from a team as a code owner October 29, 2025 07:56
@sagnghos sagnghos requested a review from a team October 29, 2025 07:56
@product-auto-label product-auto-label bot added size: m Pull request size is medium. api: spanner Issues related to the googleapis/python-spanner API. labels Oct 29, 2025
@rahul2393 rahul2393 added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Oct 29, 2025
@yoshi-kokoro yoshi-kokoro removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Oct 29, 2025
@rahul2393 rahul2393 added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Oct 29, 2025
@yoshi-kokoro yoshi-kokoro removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Oct 29, 2025
def __init__(self, database, pool, is_experimental_host: bool = False):
self._database = database
self._pool = pool
self._is_experimental_host = is_experimental_host
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please keep the name consistent everywhere experimental_host or _experimental_host

@sagnghos sagnghos requested a review from surbhigarg92 October 30, 2025 10:20
@rahul2393 rahul2393 added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Nov 4, 2025
@yoshi-kokoro yoshi-kokoro removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Nov 4, 2025
@rahul2393 rahul2393 added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Nov 5, 2025
@yoshi-kokoro yoshi-kokoro removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Nov 5, 2025
@rahul2393 rahul2393 merged commit 9535e5e into googleapis:main Nov 6, 2025
17 of 19 checks passed
gcf-merge-on-green bot pushed a commit that referenced this pull request Dec 10, 2025
PR created by the Librarian CLI to initialize a release. Merging this PR will auto trigger a release.

Librarian Version: v1.0.0
Language Image: us-central1-docker.pkg.dev/cloud-sdk-librarian-prod/images-prod/python-librarian-generator@sha256:8e2c32496077054105bd06c54a59d6a6694287bc053588e24debe6da6920ad91
<details><summary>google-cloud-spanner: 3.60.0</summary>

## [3.60.0](https://togithub.com/googleapis/python-spanner/compare/v3.59.0...v3.60.0) (2025-12-10)

### Features

* make built-in metrics enabled by default (#1459) ([64aebe7](https://togithub.com/googleapis/python-spanner/commit/64aebe7e))

* Exposing AutoscalingConfig in InstancePartition ([8b6f154](https://togithub.com/googleapis/python-spanner/commit/8b6f1540))

* add support for experimental host (#1452) ([9535e5e](https://togithub.com/googleapis/python-spanner/commit/9535e5e0))

* enable OpenTelemetry metrics and tracing by default (#1410) ([bb5095d](https://togithub.com/googleapis/python-spanner/commit/bb5095df))

* add cloud.region, request_tag and transaction_tag in span attributes (#1449) ([d37fb80](https://togithub.com/googleapis/python-spanner/commit/d37fb80a))

* Add QueryAdvisorResult for query plan (PiperOrigin-RevId: 832425466) ([e08260f](https://togithub.com/googleapis/python-spanner/commit/e08260fe))

* Add Send and Ack mutations for Queues (PiperOrigin-RevId: 832425466) ([e08260f](https://togithub.com/googleapis/python-spanner/commit/e08260fe))

* Add Spanner location API (#1457) (PiperOrigin-RevId: 833474957) ([e08260f](https://togithub.com/googleapis/python-spanner/commit/e08260fe))

### Bug Fixes

* Deprecate credentials_file argument ([8b6f154](https://togithub.com/googleapis/python-spanner/commit/8b6f1540))

* configure keepAlive time for gRPC TCP connections (#1448) ([efb2833](https://togithub.com/googleapis/python-spanner/commit/efb2833e))

* Provide Spanner Option to disable metrics (#1460) ([f1ebc43](https://togithub.com/googleapis/python-spanner/commit/f1ebc43b))

### Documentation

* Update description for the BatchCreateSessionsRequest and Session (PiperOrigin-RevId: 832425466) ([e08260f](https://togithub.com/googleapis/python-spanner/commit/e08260fe))

* Update description for the IsolationLevel (PiperOrigin-RevId: 832425466) ([e08260f](https://togithub.com/googleapis/python-spanner/commit/e08260fe))

</details>
rahul2393 pushed a commit that referenced this pull request Feb 26, 2026
Previously #1452
introduced changes to support python spanner client against spanner
experimental host endpoints over insecure communication

This PR extends those changes to support python spanner client
connections to experimental host endpoints over TLS / mTLS connections
as well. It also includes changes to run Integration Tests against
experimental hosts across all 3 modes of network communication
(plain-text, TLS, mTLS)

To run IT tests against experimental host set below variables
```
export SPANNER_EXPERIMENTAL_HOST=localhost:15000
```
For tls/mTLS set below additonal variables:
- (mTLS/TLS)
```
export CA_CERTIFICATE=/tmp/experimental_host/ca-certificates/ca.crt
```
- (mTLS)
```
export CLIENT_CERTIFICATE=/tmp/experimental_host/certs/client.crt
export CLIENT_KEY=/tmp/experimental_host/certs/client.key
```

Then we can run below command to tigger the tests:
```
python -m pytest -v -s --disable-warnings  tests/system/
```

---------

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Co-authored-by: gcf-merge-on-green[bot] <60162190+gcf-merge-on-green[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api: spanner Issues related to the googleapis/python-spanner API. size: m Pull request size is medium.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants