Skip to content

chore: deprecate experimental_host and add instance_type and endpoint support for Spanner Omni - #64

Open
sagnghos wants to merge 1 commit into
cloudspannerecosystem:mainfrom
sagnghos:sagnghos/spannerOmni
Open

chore: deprecate experimental_host and add instance_type and endpoint support for Spanner Omni#64
sagnghos wants to merge 1 commit into
cloudspannerecosystem:mainfrom
sagnghos:sagnghos/spannerOmni

Conversation

@sagnghos

@sagnghos sagnghos commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

Description

This PR updates spanner-graph-notebook to support connecting to Spanner Omni via the standard --instance_type omni and --endpoint arguments, while deprecating --experimental_host.

Key Changes:

  • Deprecate --experimental_host: Emits a DeprecationWarning when --experimental_host is used in the %%spanner_graph cell magic, automatically normalizing it to --instance_type omni --endpoint <host:port>.
  • --instance_type & --endpoint Support: Added --instance_type and --endpoint arguments to %%spanner_graph, DatabaseSelector, and CloudSpannerDatabase.
  • General Endpoint Support: --endpoint can be provided for both Cloud Spanner (passed to ClientOptions(quota_project_id=project_id, api_endpoint=endpoint)) and Spanner Omni instances.
  • Client Library Compatibility: In CloudSpannerDatabase, passes instance_type="omni" and ClientOptions(api_endpoint=endpoint) when supported by google-cloud-spanner (>= 3.72.0), while gracefully falling back to experimental_host=endpoint on older versions (< 3.72.0).
  • Internal Cleanups: Renamed internal enum SpannerEnv.EXPERIMENTAL_HOST to SpannerEnv.OMNI and removed obsolete internal helper references.
  • Unit Tests: Added comprehensive tests covering Spanner Omni connections, custom Cloud endpoints, and deprecated flag normalization.

Bug Tracking:

… support

- Deprecate --experimental_host in %%spanner_graph magic with a DeprecationWarning, redirecting to --instance_type omni --endpoint.
- Add --instance_type and --endpoint options to %%spanner_graph and database selectors.
- Update CloudSpannerDatabase to use instance_type and client_options with api_endpoint for Spanner Omni, falling back to experimental_host on older client libraries.
- Pass endpoint to Cloud Spanner client_options for custom Spanner endpoints.
- Update internal SpannerEnv and selectors from EXPERIMENTAL_HOST to OMNI.
- Add unit tests for Spanner Omni connection options, custom cloud endpoints, and deprecated experimental_host handling.

b/509773235
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