Skip to content

[SpannerToSourceDb] Removing pwd input validation in Reverse replication and Bulk templates - #4264

Merged
darshan-sj merged 7 commits into
mainfrom
rr-ssl
Sep 17, 2026
Merged

darshan-sj merged 7 commits into
mainfrom
rr-ssl

Conversation

@darshan-sj

Copy link
Copy Markdown
Contributor

Tested:

  • Unit tests
  • Changed one existing integration test to use SSL based authentication without password

@darshan-sj
darshan-sj requested a review from a team as a code owner September 16, 2026 09:27
@darshan-sj darshan-sj added the improvement Making existing code better label Sep 16, 2026
@gemini-code-assist

Copy link
Copy Markdown
Contributor

Summary of Changes

Hello, 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 modifies the shard configuration parsing logic to allow for empty passwords. This change enables support for database connections that rely on SSL/TLS certificate-based authentication rather than traditional password-based credentials. Corresponding updates were made to unit tests and the SpannerToSourceDb integration test suite to reflect this change in behavior.

Highlights

  • Password Validation Removal: Removed the strict validation that required a password to be present for shard configurations, allowing for empty passwords to support alternative authentication methods like SSL.
  • Integration Test Update: Updated the SpannerToSourceDb integration test to demonstrate and verify SSL-based authentication without a password, including the creation of a dedicated database user.
Using Gemini Code Assist

The 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 /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

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 .gemini/ folder in the base of the repository. Detailed instructions can be found here.

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

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution. ↩

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request updates SourceConfigParser and ShardFileReader to allow empty or null shard passwords, defaulting them to an empty string instead of throwing a RuntimeException. The corresponding unit tests have been updated to reflect this change. Additionally, the integration test SpannerToSourceDbIT is enhanced to support SSL client certificate authentication by staging a keystore and creating a database user requiring X509. The reviewer suggested using CREATE USER IF NOT EXISTS in the integration test to make it more robust for repeated local runs.

@codecov

codecov Bot commented Sep 16, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 63.70%. Comparing base (3ee8c53) to head (d4d646a).

Additional details and impacted files
@@             Coverage Diff              @@
##               main    #4264      +/-   ##
============================================
+ Coverage     56.35%   63.70%   +7.34%     
+ Complexity     7856     3011    -4845     
============================================
  Files          1154      576     -578     
  Lines         73203    33720   -39483     
  Branches       8583     3809    -4774     
============================================
- Hits          41253    21480   -19773     
+ Misses        29163    11154   -18009     
+ Partials       2787     1086    -1701     
Components Coverage Δ
spanner-templates 84.46% <100.00%> (+<0.01%) ⬆️
spanner-import-export ∅ <ø> (∅)
spanner-live-forward-migration 88.93% <100.00%> (+0.01%) ⬆️
spanner-live-reverse-replication 80.83% <100.00%> (+<0.01%) ⬆️
spanner-bulk-migration 88.97% <100.00%> (+<0.01%) ⬆️
gcs-spanner-dv 88.04% <100.00%> (+0.01%) ⬆️
Files with missing lines Coverage Δ
...ud/teleport/v2/spanner/migrations/shard/Shard.java 81.81% <100.00%> (-2.28%) ⬇️
...r/migrations/source/config/SourceConfigParser.java 80.48% <ø> (+0.94%) ⬆️
...t/v2/spanner/migrations/utils/ShardFileReader.java 91.42% <ø> (+4.58%) ⬆️

... and 599 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@pull-request-size pull-request-size Bot added size/L and removed size/M labels Sep 16, 2026

@bharadwaj-aditya bharadwaj-aditya left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@darshan-sj
darshan-sj merged commit 6e68e20 into main Sep 17, 2026
32 checks passed
@darshan-sj
darshan-sj deleted the rr-ssl branch September 17, 2026 07:04
superboum pushed a commit to ConsioAi/DataflowTemplates that referenced this pull request Sep 25, 2026
…ion and Bulk templates (GoogleCloudPlatform#4264)

* [SpannerToSourceDb] Removing pwd input validation

* Added bulk migration SSL based authentication integration test

* Added unit tests

* Correcting IT

* formatting fixes

* Addressing review comments

* Fixing UT
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

improvement Making existing code better size/L

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants