chore: deprecate experimentalHost and add instanceType support for Spanner Omni - #87
Merged
Merged
Conversation
mayurkale22
approved these changes
Jul 13, 2026
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.
This PR deprecates the
ExperimentalHostoption/flag and introduces theInstanceTypeconfiguration parameter supportingCLOUDandOMNIinstances. This aligns the repository with modern Spanner architecture design patterns and improves backward-compatible fallback logic.Key Changes
ExperimentalHost:ExperimentalHostas deprecated in both the clientOptions(options.go) and wrapperOptions(spanner.go).--experimentalHostflag in the CLI launcher.ExperimentalHost = truetoInstanceType = OMNIand sets plain-text insecure transport credentials to preserve backward compatibility.InstanceType:InstanceTypestring enum field withCLOUD(default) andOMNIoptions.createExperimentalHostCredentials->createSpannerOmniCredentials) to reflect general Spanner Omni connectivity."projects/default/instances/default/databases/"whenInstanceType == OMNI(or the deprecatedExperimentalHost == true).InstanceTypeparameter independently.How to Run/Test Against Spanner Omni
Running Integration Tests
To execute integration tests against a locally running Spanner Omni / emulator instance:
Example (running against an instance at port
15000):SPANNER_INSTANCE_TYPE=OMNI go test -v ./cassandra/gocql -tags=integration -args -target=spanner -spanner-endpoint=localhost:15000Running the CLI Launcher
To launch the Cassandra-to-Spanner adapter proxy using the new
instanceTypeparameter:Example:
go run cassandra_launcher.go -db test-db -endpoint localhost:15000 -instanceType OMNI -usePlainText -tcp ":9042" -grpc-channels 1Similar PRs for reference:
googleapis/google-cloud-go#14694
googleapis/java-spanner-cassandra#357