Skip to content

test: add integration test for PostgreSQL partitioned tables#4018

Merged
jsuhani-2026 merged 2 commits into
mainfrom
jsuhani-pg-partitioned-tables-it
Jul 15, 2026
Merged

test: add integration test for PostgreSQL partitioned tables#4018
jsuhani-2026 merged 2 commits into
mainfrom
jsuhani-pg-partitioned-tables-it

Conversation

@jsuhani-2026

Copy link
Copy Markdown
Contributor

Added a new end-to-end integration test (PostgreSQLPartitionedTablesIT) to verify that the SourceDbToSpanner template correctly migrates partitioned tables from a PostgreSQL source into Cloud Spanner.

It validates data ingestion for all three PostgreSQL partitioning strategies across both GoogleSQL and PostgreSQL Spanner dialects:

  • RANGE partitioning (measurements_range table)
  • LIST partitioning (employees_list table)
  • HASH partitioning (orders_hash table)

@jsuhani-2026 jsuhani-2026 added the addition New feature or request label Jul 12, 2026
@jsuhani-2026 jsuhani-2026 force-pushed the jsuhani-pg-partitioned-tables-it branch from 9fed72d to 319837e Compare July 13, 2026 10:40
@codecov

codecov Bot commented Jul 13, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 63.49%. Comparing base (1608d1d) to head (90dff43).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff              @@
##               main    #4018      +/-   ##
============================================
+ Coverage     55.70%   63.49%   +7.78%     
+ Complexity     7236     2508    -4728     
============================================
  Files          1124      535     -589     
  Lines         68447    30720   -37727     
  Branches       7721     3420    -4301     
============================================
- Hits          38127    19505   -18622     
+ Misses        27846    10202   -17644     
+ Partials       2474     1013    -1461     
Components Coverage Δ
spanner-templates 88.07% <ø> (+0.41%) ⬆️
spanner-import-export ∅ <ø> (∅)
spanner-live-forward-migration 89.21% <ø> (-0.08%) ⬇️
spanner-live-reverse-replication 83.40% <ø> (-0.07%) ⬇️
spanner-bulk-migration 92.43% <ø> (-0.05%) ⬇️
gcs-spanner-dv 89.98% <ø> (+1.43%) ⬆️
see 613 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.

@jsuhani-2026 jsuhani-2026 requested review from shreyakhajanchi and sm745052 and removed request for shreyakhajanchi and sm745052 July 13, 2026 12:27
@jsuhani-2026 jsuhani-2026 marked this pull request as ready for review July 13, 2026 12:27
@jsuhani-2026 jsuhani-2026 requested a review from a team as a code owner July 13, 2026 12:27
@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 introduces a comprehensive end-to-end integration test suite to ensure the SourceDbToSpanner template correctly handles PostgreSQL partitioned tables. By validating multiple partitioning schemes and both Spanner dialects, the changes improve the reliability of database migrations involving complex table structures.

Highlights

  • New Integration Test: Added PostgreSQLPartitionedTablesIT to verify migration of partitioned tables from PostgreSQL to Cloud Spanner.
  • Partitioning Strategies: The test covers RANGE, LIST, and HASH partitioning strategies for PostgreSQL source databases.
  • Dialect Support: Verified data ingestion compatibility for both GoogleSQL and PostgreSQL Spanner dialects.
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 introduces a new integration test, PostgreSQLPartitionedTablesIT, along with corresponding SQL schemas to verify the migration of PostgreSQL partitioned tables (range, list, and hash partitions) to both GoogleSQL and PostgreSQL dialect Spanner databases. The code review feedback identifies two key issues: first, the static declaration of the jobInfo field should be replaced with local variables within each test method to prevent potential race conditions; second, the third parameter of launchDataflowJob is incorrectly supplied with a comma-separated list of tables instead of a proper GCS path prefix.

@jsuhani-2026 jsuhani-2026 force-pushed the jsuhani-pg-partitioned-tables-it branch from 319837e to 01ee230 Compare July 13, 2026 13:07

@sm745052 sm745052 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

@jsuhani-2026 jsuhani-2026 merged commit b3660ae into main Jul 15, 2026
25 checks passed
@jsuhani-2026 jsuhani-2026 deleted the jsuhani-pg-partitioned-tables-it branch July 15, 2026 11:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

addition New feature or request size/L

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants