chore(spanner): deprecate experimental host option/parameter to replace with Spanner Omni#13236
chore(spanner): deprecate experimental host option/parameter to replace with Spanner Omni#13236sagnghos wants to merge 2 commits into
Conversation
There was a problem hiding this comment.
Code Review
This pull request rebrands 'experimental host' features as 'Spanner Omni' and introduces a formal InstanceType enum (CLOUD, OMNI, EMULATOR) to manage connection types. The changes include updating configuration constants, renaming internal methods and helper classes, and deprecating older 'experimental host' properties in favor of the new type property. Feedback focuses on the setType(InstanceType.OMNI) implementation, specifically regarding a strict order dependency where setHost must be called before setType, which violates standard builder patterns. Additionally, the current implementation has destructive side effects that can silently overwrite user-provided configurations for project IDs and session pool options, especially when re-invoked through methods like usePlainText().
da1d328 to
ad29f9b
Compare
…ce with spanner omni
08e3bee to
297835d
Compare
297835d to
a6a228d
Compare
This PR deprecates the
experimentalHost/isExperimentalHostoption and property across the Cloud Spanner client libraries (SpannerOptionsandConnectionOptions) and introduces a unifiedtypeoption and connection parameter (supporting the valuescloud,omni, andemulator).To connect to a Spanner Omni instance, users should now use the
setType(InstanceType.OMNI)builder option or pass the connection string query parameter?type=omni.Refer to discussion: Spanner Client Library Configuration for Omni
Currently, setting the type to
cloudoremulatoracts as a no-op (since the client library automatically resolves default behaviors for standard cloud and emulator setups). However, introducing this option makes the client library highly extendable, enabling us to enforce or optimize custom behaviors tailored to specific Spanner instance types in the future.