Skip to content

Conversation

@nmemond
Copy link
Contributor

@nmemond nmemond commented Dec 12, 2025

This PR is built on top of #3037, that PR should be reviewed and merged first.

This adds integration tests to verify table and index limits during live spanner data migration from a PostgreSQL DB.

This includes tests for the following limits:

  • max size of a STRING cell
  • max size of data per cell
  • max size of a primary key
  • max size of an index
  • total size of non-key columns (currently ignored because of OOM issues with low-provisioned VMs/DBs)

…migration from a MySQL database to a Spanner instance

This includes tests for the following limits:
- max size of a STRING cell
- max size of a data per cell
- max size of a primary key
- max size of an index
- total size of non-key columns (currently ignored because of OOM issues with low-provisioned VMs/DBs)
@gemini-code-assist
Copy link

Summary of Changes

Hello @nmemond, 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 significantly enhances the testing suite for the DataStreamToSpanner Flex template by introducing a series of integration tests. These tests are designed to rigorously validate the template's ability to handle various data size and structural limits when migrating live data from PostgreSQL and MySQL databases to Spanner, supporting both Spanner's GoogleSQL and PostgreSQL dialects. The primary goal is to ensure robust data integrity and migration success even with challenging data characteristics like extremely large keys, cells, or wide tables.

Highlights

  • Comprehensive Limit Testing: New integration tests have been added to verify various table and index limits during live Spanner data migration from both PostgreSQL and MySQL databases.
  • Multi-Dialect Support: The new tests cover migration scenarios for both GoogleSQL and PostgreSQL dialects of Spanner targets, ensuring broad compatibility.
  • Specific Limit Scenarios: Tests include validation for maximum string cell size, data per cell, primary key size, index size, and wide rows, addressing critical edge cases in data migration.
  • Refactored Test Utilities: Common SQL execution logic and Spanner resource manager setup for PostgreSQL dialect have been moved to a base class, improving code reusability and test maintainability.
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 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 counter productive. 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.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

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.

@nmemond nmemond force-pushed the pg-table-and-index-limit-tests-live branch from e9c3a59 to 79ebae8 Compare December 15, 2025 14:35
@codecov
Copy link

codecov bot commented Dec 17, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 54.20%. Comparing base (fa4c196) to head (79ebae8).
⚠️ Report is 14 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff              @@
##               main    #3107      +/-   ##
============================================
+ Coverage     50.48%   54.20%   +3.72%     
+ Complexity     5040     2157    -2883     
============================================
  Files           973      488     -485     
  Lines         59721    28151   -31570     
  Branches       6511     2946    -3565     
============================================
- Hits          30149    15260   -14889     
+ Misses        27443    11954   -15489     
+ Partials       2129      937    -1192     
Components Coverage Δ
spanner-templates 71.83% <ø> (+1.10%) ⬆️
spanner-import-export ∅ <ø> (∅)
spanner-live-forward-migration 80.08% <ø> (-0.02%) ⬇️
spanner-live-reverse-replication 77.80% <ø> (-0.02%) ⬇️
spanner-bulk-migration 88.22% <ø> (-0.02%) ⬇️
see 502 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.

@nmemond nmemond force-pushed the pg-table-and-index-limit-tests-live branch from 79ebae8 to 0d411f0 Compare December 23, 2025 14:32
@nmemond nmemond force-pushed the pg-table-and-index-limit-tests-live branch from 0d411f0 to 7d2785f Compare December 24, 2025 14:12
@nmemond nmemond force-pushed the pg-table-and-index-limit-tests-live branch from 7d2785f to f9bebcc Compare December 24, 2025 14:18
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