Skip to content

Adding machine type validator for forward migration#3092

Merged
shreyakhajanchi merged 6 commits intoGoogleCloudPlatform:mainfrom
shreyakhajanchi:denylist-machine
Dec 15, 2025
Merged

Adding machine type validator for forward migration#3092
shreyakhajanchi merged 6 commits intoGoogleCloudPlatform:mainfrom
shreyakhajanchi:denylist-machine

Conversation

@shreyakhajanchi
Copy link
Contributor

No description provided.

@gemini-code-assist
Copy link

Summary of Changes

Hello @shreyakhajanchi, 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 crucial validation mechanism for Dataflow worker machine types within the DataStreamToSpanner template. The primary goal is to enforce a minimum CPU core requirement for worker machines, ensuring that forward migration processes run on adequately provisioned resources. This enhancement helps prevent potential performance bottlenecks or misconfigurations by validating the worker machine type early in the pipeline execution. Corresponding test files have been updated to reflect and pass this new validation.

Highlights

  • Worker Machine Type Validation: A new validation step has been introduced in the DataStreamToSpanner template to ensure that the Dataflow worker machine type meets a minimum specification of 4 CPU cores for forward migration.
  • Integration of Validator: The DataflowWorkerMachineTypeValidator is now imported and called within the DataStreamToSpanner.run method to perform this validation at pipeline creation.
  • Test Updates: Integration tests (DataStreamToSpannerITBase.java) and load tests (DataStreamToSpannerLTBase.java) have been updated to explicitly set the workerMachineType to n2-standard-4 to comply with the new validation rules.
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 10, 2025

Codecov Report

❌ Patch coverage is 0% with 6 lines in your changes missing coverage. Please review.
✅ Project coverage is 54.01%. Comparing base (58d2477) to head (282f6be).
⚠️ Report is 17 commits behind head on main.

Files with missing lines Patch % Lines
...oud/teleport/v2/templates/DataStreamToSpanner.java 0.00% 3 Missing ⚠️
...cloud/teleport/v2/templates/SourceDbToSpanner.java 0.00% 3 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               main    #3092      +/-   ##
============================================
+ Coverage     50.41%   54.01%   +3.59%     
+ Complexity     5023     2137    -2886     
============================================
  Files           970      485     -485     
  Lines         59609    28045   -31564     
  Branches       6507     2942    -3565     
============================================
- Hits          30051    15148   -14903     
+ Misses        27436    11964   -15472     
+ Partials       2122      933    -1189     
Components Coverage Δ
spanner-templates 71.58% <0.00%> (+0.93%) ⬆️
spanner-import-export ∅ <ø> (∅)
spanner-live-forward-migration 79.97% <0.00%> (-0.07%) ⬇️
spanner-live-reverse-replication 77.45% <ø> (-0.02%) ⬇️
spanner-bulk-migration 88.21% <0.00%> (-0.05%) ⬇️
Files with missing lines Coverage Δ
...oud/teleport/v2/templates/DataStreamToSpanner.java 19.35% <0.00%> (-0.24%) ⬇️
...cloud/teleport/v2/templates/SourceDbToSpanner.java 36.11% <0.00%> (-3.29%) ⬇️

... and 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.

@shreyakhajanchi shreyakhajanchi added the improvement Making existing code better label Dec 10, 2025
@shreyakhajanchi shreyakhajanchi marked this pull request as ready for review December 14, 2025 12:25
@shreyakhajanchi shreyakhajanchi requested a review from a team as a code owner December 14, 2025 12:25
Copy link
Member

@manitgupta manitgupta left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please create a tracking bug for the failing IT if it does not exist.

@shreyakhajanchi shreyakhajanchi merged commit ddf4dab into GoogleCloudPlatform:main Dec 15, 2025
21 checks passed
aasthabharill pushed a commit to aasthabharill/DataflowTemplates that referenced this pull request Dec 15, 2025
…orm#3092)

* Adding machine type validator for forward migration

* minor change

* minor change

* adding changes for bulk template

* modified test to not have 20 workers

* ignore failing test
aasthabharill pushed a commit to aasthabharill/DataflowTemplates that referenced this pull request Dec 17, 2025
…orm#3092)

* Adding machine type validator for forward migration

* minor change

* minor change

* adding changes for bulk template

* modified test to not have 20 workers

* ignore failing test
MnkyGns pushed a commit to MnkyGns/DataflowTemplates that referenced this pull request Feb 12, 2026
…orm#3092)

* Adding machine type validator for forward migration

* minor change

* minor change

* adding changes for bulk template

* modified test to not have 20 workers

* ignore failing test
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

improvement Making existing code better size/M

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants