chore: deprecate experimental_host and add instance_type and endpoint support for Spanner Omni - #64
Open
sagnghos wants to merge 1 commit into
Open
Conversation
… 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
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.
Description
This PR updates
spanner-graph-notebookto support connecting to Spanner Omni via the standard--instance_type omniand--endpointarguments, while deprecating--experimental_host.Key Changes:
--experimental_host: Emits aDeprecationWarningwhen--experimental_hostis used in the%%spanner_graphcell magic, automatically normalizing it to--instance_type omni --endpoint <host:port>.--instance_type&--endpointSupport: Added--instance_typeand--endpointarguments to%%spanner_graph,DatabaseSelector, andCloudSpannerDatabase.--endpointcan be provided for both Cloud Spanner (passed toClientOptions(quota_project_id=project_id, api_endpoint=endpoint)) and Spanner Omni instances.CloudSpannerDatabase, passesinstance_type="omni"andClientOptions(api_endpoint=endpoint)when supported bygoogle-cloud-spanner(>= 3.72.0), while gracefully falling back toexperimental_host=endpointon older versions (< 3.72.0).SpannerEnv.EXPERIMENTAL_HOSTtoSpannerEnv.OMNIand removed obsolete internal helper references.Bug Tracking: