Skip to content

fix(Spanner): Fixed shard file config structure in reverse replication FT tests.#3933

Open
pratickchokhani wants to merge 1 commit into
GoogleCloudPlatform:mainfrom
pratickchokhani:rr-shard-config-fix
Open

fix(Spanner): Fixed shard file config structure in reverse replication FT tests.#3933
pratickchokhani wants to merge 1 commit into
GoogleCloudPlatform:mainfrom
pratickchokhani:rr-shard-config-fix

Conversation

@pratickchokhani

Copy link
Copy Markdown
Contributor

No description provided.

@pratickchokhani pratickchokhani added bug Something isn't working bug-fix and removed bug Something isn't working labels Jun 22, 2026
@codecov

codecov Bot commented Jun 22, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 55.66%. Comparing base (af9d406) to head (8fd85cb).

Additional details and impacted files
@@              Coverage Diff              @@
##               main    #3933       +/-   ##
=============================================
+ Coverage     35.52%   55.66%   +20.14%     
- Complexity      697     6723     +6026     
=============================================
  Files           250     1114      +864     
  Lines         17031    68226    +51195     
  Branches       1721     7701     +5980     
=============================================
+ Hits           6051    37981    +31930     
- Misses        10474    27782    +17308     
- Partials        506     2463     +1957     
Components Coverage Δ
spanner-templates 87.93% <ø> (∅)
spanner-import-export 68.69% <ø> (∅)
spanner-live-forward-migration 90.17% <ø> (∅)
spanner-live-reverse-replication 83.57% <ø> (∅)
spanner-bulk-migration 92.57% <ø> (∅)
gcs-spanner-dv 88.85% <ø> (∅)
see 889 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.

@pratickchokhani pratickchokhani marked this pull request as ready for review June 24, 2026 11:47
@pratickchokhani pratickchokhani requested a review from a team as a code owner June 24, 2026 11:47
@pratickchokhani pratickchokhani requested review from VardhanThigle, aasthabharill and darshan-sj and removed request for VardhanThigle June 24, 2026 11:47
@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 updates the Spanner-to-SourceDB reverse replication functional tests to align with the correct shard file configuration structure. By utilizing the 'JdbcShardConfig' class, the test suite now generates configuration files in a more robust and maintainable manner, eliminating manual JSON field removal and array construction.

Highlights

  • Refactored Shard Configuration: Updated the reverse replication functional tests to use the 'JdbcShardConfig' class for generating shard configuration files instead of manually constructing JSON objects.
  • Improved Configuration Serialization: Replaced manual JSON array manipulation with the standard 'JdbcShardConfig' object structure, ensuring consistency with expected application configuration formats.
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 SpannerToSourceDbFTBase.java to use JdbcShardConfig for structuring and serializing shard configurations to GCS, replacing the manual construction of a JsonArray of Shard objects. There are no review comments, so I have no feedback to provide.

@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

JsonArray ja = new JsonArray();
ja.add(jsObj);
String shardFileContents = ja.toString();
JdbcShardConfig jdbcShardConfig = new JdbcShardConfig();

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.

nit:check if there are more references to this block and extract a method.

Marking as LGTM as this is not a blocker.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants