Skip to content

Conversation

@Abacn
Copy link
Contributor

@Abacn Abacn commented Dec 30, 2025

Part of #2279. Allow different flex templates sharing a launcher image, which builds only once during a release build

@gemini-code-assist
Copy link

Summary of Changes

Hello @Abacn, 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 significant optimizations to the Maven plugin responsible for staging Google Cloud Dataflow Flex Templates. The primary goal is to enhance efficiency by ensuring that container images shared by multiple templates are built and processed only once. This is achieved through the implementation of a new ContainerStageTracker utility and a refactoring of the template staging logic, which now intelligently manages the build process for shared images, reducing redundant operations like SBOM generation and image promotion.

Highlights

  • Shared Container Image Staging: Introduced a mechanism to stage container images for Flex Templates only once, even if multiple templates share the same base image, significantly improving build efficiency.
  • ContainerStageTracker Utility: Added a new ContainerStageTracker utility class to manage the state of staged containers and their associated command specifications, preventing redundant builds and SBOM generation.
  • Refactored Staging Logic: Modified the TemplatesReleaseMojo and TemplatesStageMojo classes to centralize the stageCommandSpecs call and integrate the ContainerStageTracker for more efficient and intelligent image management.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

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 30, 2025

Codecov Report

❌ Patch coverage is 4.05405% with 142 lines in your changes missing coverage. Please review.
✅ Project coverage is 50.76%. Comparing base (5f7700b) to head (53ea460).

Files with missing lines Patch % Lines
...loud/teleport/plugin/maven/TemplatesStageMojo.java 5.21% 109 Missing ⚠️
.../java/org/apache/beam/it/gcp/TemplateTestBase.java 0.00% 30 Missing ⚠️
...ud/teleport/plugin/maven/TemplatesReleaseMojo.java 0.00% 3 Missing ⚠️

❌ Your patch check has failed because the patch coverage (4.05%) 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    #3172      +/-   ##
============================================
- Coverage     50.82%   50.76%   -0.07%     
+ Complexity     5124     5123       -1     
============================================
  Files           976      976              
  Lines         60032    60090      +58     
  Branches       6566     6579      +13     
============================================
- Hits          30509    30502       -7     
- Misses        27384    27447      +63     
- Partials       2139     2141       +2     
Components Coverage Δ
spanner-templates 70.97% <ø> (-0.06%) ⬇️
spanner-import-export 68.85% <ø> (-0.15%) ⬇️
spanner-live-forward-migration 80.10% <ø> (ø)
spanner-live-reverse-replication 77.79% <ø> (ø)
spanner-bulk-migration 88.44% <ø> (ø)
Files with missing lines Coverage Δ
...taflow/FlexTemplateDataflowJobResourceManager.java 22.77% <ø> (ø)
...gle/cloud/teleport/plugin/DockerfileGenerator.java 90.00% <ø> (ø)
.../cloud/teleport/plugin/TemplateSpecsGenerator.java 39.49% <ø> (-0.35%) ⬇️
.../cloud/teleport/plugin/maven/TemplatesRunMojo.java 0.00% <ø> (ø)
...asticsearch/templates/BigQueryToElasticsearch.java 0.00% <ø> (ø)
...v2/elasticsearch/templates/GCSToElasticsearch.java 12.82% <ø> (ø)
...elasticsearch/templates/PubSubToElasticsearch.java 11.11% <ø> (ø)
...eport/v2/templates/DLPTextToBigQueryStreaming.java 36.22% <ø> (ø)
...oud/teleport/v2/templates/FirestoreToBigQuery.java 0.00% <ø> (ø)
.../cloud/teleport/v2/templates/PubSubToBigQuery.java 34.67% <ø> (ø)
... and 27 more

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

@Abacn Abacn force-pushed the nodelete-exp-template-share-image branch 4 times, most recently from 2a5998e to 7fe9f9f Compare January 5, 2026 18:20
@pull-request-size pull-request-size bot added size/XL and removed size/L labels Jan 5, 2026
@Abacn Abacn force-pushed the nodelete-exp-template-share-image branch 2 times, most recently from 1d05ca2 to 80e700e Compare January 5, 2026 23:56
@Abacn Abacn force-pushed the nodelete-exp-template-share-image branch from 80e700e to 53ea460 Compare January 6, 2026 03:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant