diff --git a/benchmarks/pom.xml b/benchmarks/pom.xml index ebe4fb5af6..c82802c87d 100644 --- a/benchmarks/pom.xml +++ b/benchmarks/pom.xml @@ -85,7 +85,7 @@ io.opentelemetry opentelemetry-bom - 1.44.1 + 1.46.0 pom import diff --git a/generation_config.yaml b/generation_config.yaml index 28f408df69..8e3bf93014 100644 --- a/generation_config.yaml +++ b/generation_config.yaml @@ -1,5 +1,5 @@ -gapic_generator_version: 2.51.0 -googleapis_commitish: 00196e2a68b16a864c57db2e870822875a7f1198 +gapic_generator_version: 2.51.1 +googleapis_commitish: d581bbe1a66ad2e47eda2beebf6200f23b766ca9 libraries_bom_version: 26.52.0 libraries: - api_shortname: spanner diff --git a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/SpannerOptions.java b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/SpannerOptions.java index 1d0c702cdf..42fc0c2d0b 100644 --- a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/SpannerOptions.java +++ b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/SpannerOptions.java @@ -741,7 +741,20 @@ protected SpannerOptions(Builder builder) { transportChannelExecutorThreadNameFormat = builder.transportChannelExecutorThreadNameFormat; channelProvider = builder.channelProvider; - channelConfigurator = builder.channelConfigurator; + if (builder.mTLSContext != null) { + channelConfigurator = + channelBuilder -> { + if (builder.channelConfigurator != null) { + channelBuilder = builder.channelConfigurator.apply(channelBuilder); + } + if (channelBuilder instanceof NettyChannelBuilder) { + ((NettyChannelBuilder) channelBuilder).sslContext(builder.mTLSContext); + } + return channelBuilder; + }; + } else { + channelConfigurator = builder.channelConfigurator; + } interceptorProvider = builder.interceptorProvider; sessionPoolOptions = builder.sessionPoolOptions != null @@ -1620,15 +1633,6 @@ public SpannerOptions build() { // As we are using plain text, we should never send any credentials. this.setCredentials(NoCredentials.getInstance()); } - if (mTLSContext != null) { - this.setChannelConfigurator( - builder -> { - if (builder instanceof NettyChannelBuilder) { - ((NettyChannelBuilder) builder).sslContext(mTLSContext); - } - return builder; - }); - } if (this.numChannels == null) { this.numChannels = this.grpcGcpExtensionEnabled ? GRPC_GCP_ENABLED_DEFAULT_CHANNELS : DEFAULT_CHANNELS; diff --git a/samples/snippets/pom.xml b/samples/snippets/pom.xml index f78c2d3b30..7873c36902 100644 --- a/samples/snippets/pom.xml +++ b/samples/snippets/pom.xml @@ -34,7 +34,7 @@ com.google.cloud libraries-bom - 26.50.0 + 26.53.0 pom import