Spanner: Extend SpannerIO to support Spanner Omni mTLS setup#38928
Spanner: Extend SpannerIO to support Spanner Omni mTLS setup#38928sagnghos wants to merge 4 commits into
Conversation
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request introduces support for mTLS client certificates (certificate path and key path) across the Beam Spanner connector, including SpannerIO, SpannerConfig, SpannerAccessor, and cross-language configurations, to enable native Spanner Omni support. It also updates integration tests to use a new SpannerTestHelper. The review feedback identifies several key issues: the client certificate configuration in SpannerAccessor is incorrectly nested inside the plainText block and will be skipped by default; unconditionally setting NoCredentials in SpannerConfig.withExperimentalHost creates order-dependency; validation is needed in SpannerTransformRegistrar to prevent silent failures when only one certificate parameter is provided; SpannerTestHelper should explicitly set NoCredentials in Omni mode to avoid ADC loading issues; and MetadataSpannerConfigFactory should pass ValueProviders directly rather than calling .get().
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
Summary of ChangesHello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request enables mTLS authentication for Spanner Omni by extending the SpannerConfig and SpannerIO APIs. It provides a standardized way to pass client certificate and key paths, ensuring secure connectivity for Spanner Omni users. Additionally, it refactors the integration test suite to dynamically support Spanner Omni configurations, facilitating easier validation in secure environments. Highlights
New Features🧠 You can now enable Memory (public preview) to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize the Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counterproductive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request adds support for configuring mTLS client certificates (via certificate and key paths) in SpannerConfig, SpannerIO, and cross-language configurations to natively support Spanner Omni. It also introduces SpannerTestHelper to simplify integration test setup when running against Spanner Omni. Feedback on the changes highlights two key issues: first, unconditionally setting NoCredentials in withExperimentalHost introduces order-dependency in the fluent API, which could silently overwrite user-provided credentials; second, calling .get() on the clientCert and clientKey ValueProvider instances in SpannerAccessor without checking isAccessible() first may throw an IllegalStateException during pipeline construction.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
|
Assigning reviewers: R: @ahmedabu98 for label java. Note: If you would like to opt out of this review, comment Available commands:
The PR bot will only process comments in the main thread (not review comments). |
This PR introduces capabilities to connect to Spanner Omni endpoints using mTLS and enables the integration test suite to validate against Spanner Omni.
To run IT against Spanner Omni:
GitHub Actions Tests Status (on master branch)
See CI.md for more information about GitHub Actions CI or the workflows README to see a list of phrases to trigger workflows.