Terraform module for gcs-spanner-dv - #4183
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #4183 +/- ##
============================================
+ Coverage 55.90% 63.09% +7.19%
+ Complexity 7476 2784 -4692
============================================
Files 1134 562 -572
Lines 70135 32614 -37521
Branches 8014 3645 -4369
============================================
- Hits 39209 20579 -18630
+ Misses 28380 10991 -17389
+ Partials 2546 1044 -1502
🚀 New features to boost your workflow:
|
Summary of ChangesHello, 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 Terraform support for the GCS to Spanner Data Validator, providing users with a repeatable and automated way to deploy the Dataflow pipeline. By including a structured samples directory, it simplifies the setup of required IAM roles, network configurations, and Dataflow job parameters, ensuring a consistent deployment experience. Highlights
Using Gemini Code AssistThe 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
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 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
|
There was a problem hiding this comment.
Code Review
This pull request introduces Terraform modules and samples for deploying a GCS to Spanner Data Validation Dataflow job, including a reusable module, a simple validation job sample, and associated documentation. The code review identified several critical issues in the Terraform configuration, including potential string interpolation failures when optional variables like working_directory_prefix are null, the use of an unsupported additional_pipeline_options argument in the google_dataflow_flex_template_job resource, and inadequate validation for empty string values in parameters like local_session_file_path and working_directory_bucket.
There was a problem hiding this comment.
Code Review
This pull request introduces a new Terraform sample for deploying a GCS to Spanner Data Validation Dataflow job, complete with documentation, configuration files, and variable templates. The review feedback suggests improving the robustness of the Terraform configuration by handling full self-links or relative paths for networks and subnetworks, stripping the 'gs://' prefix from user-provided bucket names to prevent invalid URIs, and updating the minimum required Terraform version to '~> 1.3' to support the optional object attributes with default values used in the variables definition.
There was a problem hiding this comment.
Code Review
This pull request introduces Terraform modules and samples for the GCS to Spanner Data Validator, including a complete sample deployment with detailed documentation. Additionally, it updates existing migration sample READMEs to standardize documentation on schema changes. The review feedback suggests constructing the default Compute Engine service account email dynamically using the project number rather than relying on the google_compute_default_service_account data source, which can cause race conditions if the Compute Engine API is enabled in the same run.
b/514941482
Since validation job is source agnostic, we only need this sample folder. For sharded flow or postgres flow, nothing will really change in the setup, so there's no point creating new samples