Skip to content

test(Spanner): Live: Sqlserver migration integration tests for datatype - #4244

Merged
pratickchokhani merged 7 commits into
GoogleCloudPlatform:mainfrom
pratickchokhani:sqlserver-live-migration-integration-datatype
Oct 27, 2026
Merged

pratickchokhani merged 7 commits into
GoogleCloudPlatform:mainfrom
pratickchokhani:sqlserver-live-migration-integration-datatype

Conversation

@pratickchokhani

Copy link
Copy Markdown
Contributor

No description provided.

@pratickchokhani
pratickchokhani force-pushed the sqlserver-live-migration-integration-datatype branch from af6c1ab to 3e286ff Compare September 10, 2026 14:44
@pratickchokhani pratickchokhani added the addition New feature or request label Sep 10, 2026
@codecov

codecov Bot commented Sep 10, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 7.87879% with 152 lines in your changes missing coverage. Please review.
✅ Project coverage is 56.86%. Comparing base (ab05391) to head (cbaadbb).

Files with missing lines Patch % Lines
...2/spanner/sqlserverutils/SQLServerITContainer.java 0.00% 67 Missing ⚠️
...it/gcp/cloudsql/CloudSqlServerResourceManager.java 0.00% 61 Missing ⚠️
...apache/beam/it/gcp/datastream/SqlServerSource.java 0.00% 23 Missing ⚠️
...m/it/gcp/datastream/DatastreamResourceManager.java 92.30% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@              Coverage Diff              @@
##               main    #4244       +/-   ##
=============================================
+ Coverage     36.74%   56.86%   +20.11%     
- Complexity      749     8072     +7323     
=============================================
  Files           250     1164      +914     
  Lines         17325    74057    +56732     
  Branches       1805     8715     +6910     
=============================================
+ Hits           6366    42112    +35746     
- Misses        10436    29140    +18704     
- Partials        523     2805     +2282     
Components Coverage Δ
spanner-templates 83.85% <0.00%> (∅)
spanner-import-export 72.15% <ø> (∅)
spanner-live-forward-migration 86.91% <0.00%> (∅)
spanner-live-reverse-replication 79.50% <0.00%> (∅)
spanner-bulk-migration 87.87% <0.00%> (∅)
gcs-spanner-dv 85.70% <0.00%> (∅)
Files with missing lines Coverage Δ
.../org/apache/beam/it/gcp/datastream/JDBCSource.java 19.23% <100.00%> (+3.23%) ⬆️
...m/it/gcp/datastream/DatastreamResourceManager.java 78.93% <92.30%> (+0.82%) ⬆️
...apache/beam/it/gcp/datastream/SqlServerSource.java 0.00% <0.00%> (ø)
...it/gcp/cloudsql/CloudSqlServerResourceManager.java 0.00% <0.00%> (ø)
...2/spanner/sqlserverutils/SQLServerITContainer.java 0.00% <0.00%> (ø)

... and 936 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 changed the title feat(Spanner): Live: Sqlserver migration integration tests for datatype test(Spanner): Live: Sqlserver migration integration tests for datatype Sep 11, 2026
@pratickchokhani
pratickchokhani force-pushed the sqlserver-live-migration-integration-datatype branch 9 times, most recently from b536a0c to fcb4884 Compare October 13, 2026 08:40
@pratickchokhani
pratickchokhani marked this pull request as ready for review October 19, 2026 05:46
@pratickchokhani
pratickchokhani requested a review from a team as a code owner October 19, 2026 05:46
@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 adds support for SQL Server migration integration tests for data types. It introduces a new CloudSqlServerResourceManager to manage Microsoft SQL Server instances, adds SqlServerSource to Datastream configurations, updates CI/CD test commands to support SQL Server parameters, and implements comprehensive integration tests for migrating SQL Server data types to both GoogleSQL and PostgreSQL dialect Spanner databases.

Highlights

  • SQL Server Integration: Added support for SQL Server as a Datastream source in integration tests, including new resource managers and source configurations.
  • New Resource Manager: Introduced CloudSqlServerResourceManager to manage SQL Server database lifecycles and enable CDC (Change Data Capture).
  • Integration Testing: Added comprehensive integration tests for SQL Server data types and expressions, including PG-dialect Spanner schema tests.
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 adds support for Microsoft SQL Server to the Datastream-to-Spanner integration tests and resource managers, including a new CloudSqlServerResourceManager, SqlServerSource configuration, and comprehensive data type migration tests (SQLServerDatastreamToSpannerDataTypesIT). Feedback on these changes includes resolving a potential failure when dropping databases due to connection pool pinning, wrapping test teardowns in try-catch blocks to prevent resource leaks, using a thread-safe set for test instances, and providing a default fallback port (1433) for SQL Server connections.

@pratickchokhani
pratickchokhani force-pushed the sqlserver-live-migration-integration-datatype branch 2 times, most recently from 5478fa5 to fd1ae69 Compare October 23, 2026 07:20
Comment thread cicd/internal/flags/it-flags.go
pratickchokhani and others added 3 commits October 26, 2026 06:28
…g connector implementation, dialect adapter, and configuration mappings
… Server integration tests and data types integration test.
@pratickchokhani
pratickchokhani force-pushed the sqlserver-live-migration-integration-datatype branch from fd1ae69 to 466be87 Compare October 26, 2026 06:29

@dhwanilpatel dhwanilpatel 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.

Overall Looks good. Couple of questions.

@pratickchokhani
pratickchokhani merged commit 9056e1d into GoogleCloudPlatform:main Oct 27, 2026
68 of 71 checks passed
@pratickchokhani
pratickchokhani deleted the sqlserver-live-migration-integration-datatype branch October 27, 2026 08:56
pratickchokhani added a commit to pratickchokhani/DataflowTemplates that referenced this pull request Oct 27, 2026
- Rebase on main after GoogleCloudPlatform#4244 (static SQL Server container, shared datatype IT).
- Align existing SQL Server ITs with the merged approach (enableCdcOnAllTables,
  shared SQLServerITContainer, resilient teardown); base class unchanged from main.
- Add live-Datastream ports of the manifest scenarios: Events, DDL (custom
  transformation, size conversion, identity), Timezone, Session (rename/drop,
  synthetic PK), SeparateShadowTable PK-focused, SingleDF sharded (@ignore until
  migration_shard_id is populated for sqlserver sources).
- Drop ITs not listed in manifest.yaml (RetryAllDLQ, sharded RetryDLQ,
  TableAndIndexLimits) and the onboarding report.
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/XXL

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants