Skip to content

chore: refactor experimental host usage and add instance type support#357

Merged
mayurkale22 merged 3 commits into
googleapis:mainfrom
sagnghos:spannerOmni
Jul 23, 2026
Merged

chore: refactor experimental host usage and add instance type support#357
mayurkale22 merged 3 commits into
googleapis:mainfrom
sagnghos:spannerOmni

Conversation

@sagnghos

@sagnghos sagnghos commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

Cleanup reference of experimental host to replace with instance type=OMNI

  • Deprecate public experimental host APIs in favor of instanceType and spannerEndpoint / SPANNER_ENDPOINT.
  • Normalize experimentalHostEndpoint to spannerEndpoint and InstanceType.OMNI in GlobalClientConfigs, SpannerCqlSessionBuilder, and LauncherConfig.
  • Update SpannerContext and test suites to use instanceType and SPANNER_ENDPOINT.
  • Rename internal default omni constants to SPANNER_OMNI_ID and SPANNER_OMNI_INSTANCE.

sidecar proxy

java  -DdatabaseUri=test-db \
        -Dhost=127.0.0.1   -Dport=9042 \
        -DinstanceType=omni \
        -DspannerEndpoint=localhost:15000 \ 
        -DusePlainText=true \ 
        -jar google-cloud-spanner-cassandra/target/spanner-cassandra-launcher.jar

Integration Test command

mvn verify -Penable-integration-tests -pl integration-tests \
  -Dspanner_cassandra.instance_type=omni \
  -DSPANNER_ENDPOINT="localhost:15000" \
   -Dspanner_cassandra.use_plain_text=true -DskipITs=false

Similar PRs for reference:
googleapis/google-cloud-java#13236
GoogleCloudPlatform/pgadapter#4575

- Deprecate public experimental host APIs in favor of instanceType and spannerEndpoint / SPANNER_ENDPOINT.
- Normalize experimentalHostEndpoint to spannerEndpoint and InstanceType.OMNI in GlobalClientConfigs, SpannerCqlSessionBuilder, and LauncherConfig.
- Update SpannerContext and test suites to use instanceType and SPANNER_ENDPOINT.
- Rename internal default omni constants to SPANNER_OMNI_ID and SPANNER_OMNI_INSTANCE.
… InstanceType enum

- Change GlobalClientConfigs instanceType field and getter to return InstanceType enum instead of String.
- Rename SpannerCqlSessionBuilder.setEndpointType to setInstanceType.
- Update LauncherConfig, YamlConfigLoaderTest, SpannerCqlSessionBuilderTest, and SpannerContext call sites.
@sagnghos
sagnghos requested a review from mayurkale22 July 14, 2026 04:43
- Remove unused Logger in AdapterOptions.
- Remove unused test resource invalid-host-conflict-config.yaml.
- Update copyright year in AdapterOptionsTest.
- Add default InstanceType.CLOUD test in AdapterOptionsTest.
- Add default InstanceType.CLOUD assertions in LauncherConfigParserTest.
@mayurkale22
mayurkale22 merged commit 7af1f98 into googleapis:main Jul 23, 2026
28 of 33 checks passed
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.

3 participants