Skip to content

Conversation

@nmemond
Copy link
Contributor

@nmemond nmemond commented Dec 1, 2025

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

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)
@nmemond nmemond requested a review from a team as a code owner December 1, 2025 21:02
@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 robustness of the DataStreamToSpanner Flex template by adding a suite of integration tests. These tests are crucial for validating how the migration process handles various data size constraints and limits imposed by Spanner, ensuring that large or complex datasets can be migrated reliably without encountering unexpected issues related to table, index, or cell size. The addition of PostgreSQL dialect Spanner resource management also broadens the testing scope.

Highlights

  • New Integration Tests: Introduced new integration tests for the DataStreamToSpanner Flex template to verify table and index limits during live data migration from MySQL to Spanner.
  • Limit Verification: The tests specifically cover the maximum size of a STRING cell, maximum data per cell, maximum primary key size, maximum index size, and the total size of non-key columns (though the latter is currently ignored due to OOM issues).
  • Spanner Dialect Support: Added support for setting up Spanner resource managers with a PostgreSQL dialect, enabling testing against different Spanner configurations.
  • Centralized SQL Execution: Refactored SQL script execution into a common base class method, executeSqlScript, to improve code reusability and maintainability across integration tests.
  • New Schema Resources: Included new SQL schema files for MySQL and both standard and PostgreSQL dialect Spanner, tailored to create tables and data that push various size limits.
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.

@codecov
Copy link

codecov bot commented Dec 15, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 54.20%. Comparing base (fa4c196) to head (23e7960).

Additional details and impacted files
@@             Coverage Diff              @@
##               main    #3037      +/-   ##
============================================
+ Coverage     50.48%   54.20%   +3.71%     
+ Complexity     5040     2156    -2884     
============================================
  Files           973      488     -485     
  Lines         59721    28151   -31570     
  Branches       6511     2946    -3565     
============================================
- Hits          30149    15258   -14891     
+ Misses        27443    11956   -15487     
+ Partials       2129      937    -1192     
Components Coverage Δ
spanner-templates 71.82% <ø> (+1.08%) ⬆️
spanner-import-export ∅ <ø> (∅)
spanner-live-forward-migration 80.10% <ø> (ø)
spanner-live-reverse-replication 77.77% <ø> (-0.05%) ⬇️
spanner-bulk-migration 88.23% <ø> (ø)
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.

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