Repository navigation
Test pre-staged release templates in release.yml instead of rebuilding - #4625
Conversation
Add support for resolving pre-staged release template specs via -DspecPathPrefix (and --it-spec-path-prefix in cicd runners) so the release workflow tests the staged release artifacts at gs://<stageBucket>/<candidateName>/ instead of rebuilding and re-staging templates from source during integration tests. - Add TemplateTestBase.getPreStagedSpecPath() supporting Classic (<prefix>/<name>) and Flex/Python/YAML (<prefix>/flex/<name>) layouts without registering pre-staged specs in the cleanup cache. - Wire -DspecPathPrefix in TemplateTestBase, TemplateLoadTestBase, and FlexTemplateDataflowJobResourceManager (still staging locally when an additionalMavenProfile is set). - Add --it-spec-path-prefix flag in cicd/internal/flags and pass it in run-it-tests and run-it-smoke-tests. - Add stageBucket input (defaulting to dataflow-templates-staging) to .github/workflows/release.yml and pass --it-spec-path-prefix to all release integration test steps.
Codecov Report❌ Patch coverage is ❌ Your patch check has failed because the patch coverage (0.00%) is below the target coverage (80.00%). You can increase the patch coverage or adjust the target coverage. Additional details and impacted files@@ Coverage Diff @@
## main #4625 +/- ##
=============================================
+ Coverage 33.53% 59.72% +26.18%
- Complexity 512 8383 +7871
=============================================
Files 219 1123 +904
Lines 13486 72735 +59249
Branches 1373 8852 +7479
=============================================
+ Hits 4523 43442 +38919
- Misses 8590 26393 +17803
- Partials 373 2900 +2527
🚀 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 introduces a mechanism to use pre-staged Dataflow template specifications during integration tests. By allowing tests to point to a GCS prefix containing pre-built templates, the system avoids redundant and time-consuming rebuilds of templates from source code. This change improves CI/CD efficiency by enabling the testing of release candidates directly from their staged locations. Highlights
Ignored Files
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 a new specPathPrefix configuration flag to integration tests, allowing them to use pre-staged templates from a GCS prefix instead of building and staging them from source. Changes span Go CLI flags, Java test base classes, and resource managers, along with corresponding unit tests. The review feedback highlights a critical issue in the newly added unit tests (TemplateTestBaseTest and FlexTemplateDataflowJobResourceManagerTest), where system properties are cleared during teardown without restoring their original values, potentially causing test pollution in the shared JVM.
|
@Abacn the first Release run since this merged failed in "Run Integration Tests With DEFAULT": https://github.com/GoogleCloudPlatform/DataflowTemplates/actions/runs/46475491825 The only failing test was What seems to be happening:
A rerun will hit the same error. Some options (untested):
Example failed job: https://console.cloud.google.com/dataflow/jobs/us-west2/2026-11-30_11_26_20-5464299733782828715?project=cloud-teleport-testing |
Add support for resolving pre-staged release template specs via -DspecPathPrefix (and --it-spec-path-prefix in cicd runners) so the release workflow tests the staged release artifacts at gs://// instead of rebuilding and re-staging templates from source during integration tests.
Add TemplateTestBase.getPreStagedSpecPath() supporting Classic (/) and Flex/Python/YAML (/flex/) layouts without registering pre-staged specs in the cleanup cache.
Wire -DspecPathPrefix in TemplateTestBase, TemplateLoadTestBase, and FlexTemplateDataflowJobResourceManager (still staging locally when an additionalMavenProfile is set).
Add --it-spec-path-prefix flag in cicd/internal/flags and pass it in run-it-tests and run-it-smoke-tests.
Add stageBucket input (defaulting to dataflow-templates-staging) to .github/workflows/release.yml and pass --it-spec-path-prefix to all release integration test steps.