Skip to content

Conversation

@nmemond
Copy link
Contributor

@nmemond nmemond commented Dec 11, 2025

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

This adds integration tests to verify table and index limits during bulk 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)

Note, this also updates the length of the BYTES row that we migrate because the previous value did not actually exceed
the limit (it ended up being 7MiB, less than the 10MiB max). This now writes a value that's actually larger than the
limit and verifies that the row is NOT saved.
Currently ignored because it causes OOMs on 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 robustness of the bulk Spanner migration tool by adding comprehensive integration tests. These tests are designed to ensure that the migration process correctly handles various data size constraints and limits imposed by Spanner, including those for individual string cells, entire rows, primary keys, and secondary indexes. This proactive testing helps prevent data integrity issues and ensures reliable migrations, particularly for large or complex datasets from PostgreSQL and MySQL sources.

Highlights

  • New Integration Tests for Spanner Limits: Introduces several new integration tests to verify Spanner's table and index limits during bulk data migration from PostgreSQL and MySQL.
  • Specific Limit Coverage: Tests cover maximum size for STRING cells, total data size per cell, primary key size, and index size.
  • PostgreSQL Dialect Support: Enhances existing test infrastructure and adds new tests to specifically validate these limits when migrating to Spanner with PostgreSQL dialect.
  • Resource Management Refinement: Updates the base test class to include a PostgreSQL dialect Spanner resource manager and refactors resource initialization in existing tests for better management.
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 12, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 55.64%. Comparing base (a73e0f0) to head (3e1d51d).
⚠️ Report is 58 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff              @@
##               main    #3103      +/-   ##
============================================
+ Coverage     50.26%   55.64%   +5.38%     
+ Complexity     5021     1613    -3408     
============================================
  Files           967      468     -499     
  Lines         59268    26361   -32907     
  Branches       6458     2771    -3687     
============================================
- Hits          29789    14669   -15120     
+ Misses        27376    10800   -16576     
+ Partials       2103      892    -1211     
Components Coverage Δ
spanner-templates 71.60% <ø> (+1.15%) ⬆️
spanner-import-export ∅ <ø> (∅)
spanner-live-forward-migration 80.03% <ø> (+0.33%) ⬆️
spanner-live-reverse-replication 77.42% <ø> (+0.34%) ⬆️
spanner-bulk-migration 88.25% <ø> (-0.09%) ⬇️
see 535 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