Skip to content

try to fix forward tests for java 17#39058

Merged
derrickaw merged 5 commits into
masterfrom
20260622_fixOtherTests#2
Jun 22, 2026
Merged

try to fix forward tests for java 17#39058
derrickaw merged 5 commits into
masterfrom
20260622_fixOtherTests#2

Conversation

@derrickaw

@derrickaw derrickaw commented Jun 22, 2026

Copy link
Copy Markdown
Collaborator
  1. PostCommit TransformService Direct and PostCommit XVR Spark3 are failing now after Roll forward io expansion service to Java17 #38974 merged.
  2. Adding similar Roll forward io expansion service to Java17 #38974 changes to XVR tests and try to handle the java 17 part better.

https://github.com/apache/beam/actions/runs/27968245213
https://github.com/apache/beam/actions/runs/27968262679/job/82767635828 - one part times out and may require increasing timeout for test workflow


Thank you for your contribution! Follow this checklist to help us incorporate your contribution quickly and easily:

  • Mention the appropriate issue in your description (for example: addresses #123), if applicable. This will automatically add a link to the pull request in the issue. If you would like the issue to automatically close on merging the pull request, comment fixes #<ISSUE NUMBER> instead.
  • Update CHANGES.md with noteworthy changes.
  • If this contribution is large, please file an Apache Individual Contributor License Agreement.

See the Contributor Guide for more tips on how to make review process smoother.

To check the build health, please visit https://github.com/apache/beam/blob/master/.test-infra/BUILD_STATUS.md

GitHub Actions Tests Status (on master branch)

Build python source distribution and wheels
Python tests
Java tests
Go tests

See CI.md for more information about GitHub Actions CI or the workflows README to see a list of phrases to trigger workflows.

@github-actions github-actions Bot added the build label Jun 22, 2026
@github-actions github-actions Bot added the java label Jun 22, 2026
@derrickaw derrickaw changed the title try to fix forward with 17 only try to fix forward tests for java 17 Jun 22, 2026
@derrickaw derrickaw marked this pull request as ready for review June 22, 2026 19:49
@derrickaw derrickaw merged commit 54231e8 into master Jun 22, 2026
33 of 34 checks passed
@derrickaw derrickaw deleted the 20260622_fixOtherTests#2 branch June 22, 2026 19:49
@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 addresses failures in PostCommit TransformService and XVR Spark3 tests following recent changes. The modifications primarily focus on upgrading the Transform Service to Java 17 and enhancing the build infrastructure to better handle Java version-specific configurations during test execution.

Highlights

  • Java 17 Compatibility: Updated the Transform Service controller container to use Java 17 (Eclipse Temurin) instead of Java 11.
  • Gradle Plugin Enhancements: Improved BeamModulePlugin to dynamically handle Java version overrides and property lookups, ensuring better support for cross-version testing.
  • Test Infrastructure: Refactored container suffix resolution to respect the testJavaVersion property, allowing for more flexible test configurations.
New Features

🧠 You can now enable Memory (public preview) 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.

Ignored Files
  • Ignored by pattern: .github/workflows/** (6)
    • .github/workflows/beam_PostCommit_XVR_Flink.yml
    • .github/workflows/beam_PostCommit_XVR_GoUsingJava_Dataflow.yml
    • .github/workflows/beam_PostCommit_XVR_JavaUsingPython_Dataflow.yml
    • .github/workflows/beam_PostCommit_XVR_PythonUsingJavaSQL_Dataflow.yml
    • .github/workflows/beam_PostCommit_XVR_PythonUsingJava_Dataflow.yml
    • .github/workflows/beam_PostCommit_XVR_Spark3.yml
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 updates the Java version configurations in the Gradle build plugin and upgrades the base image of the transform service controller container from Java 11 to Java 17. Specifically, it replaces hasProperty and getProperty calls with findProperty to safely resolve Java home paths, and dynamically resolves the Java container suffix when testJavaVersion is specified. Feedback suggests making transformServiceJavaContainerSuffix dynamic rather than hardcoded to 'java17' to prevent test failures on other Java versions, and adding a safety check to ensure java${testJavaVersion}Home is defined before configuring test tasks.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.


// Transform service delivers transforms that refer to SDK harness containers with following sufixes.
def transformServiceJavaContainerSuffix = 'java11'
def transformServiceJavaContainerSuffix = 'java17'

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.

high

Hardcoding transformServiceJavaContainerSuffix to 'java17' will cause test failures when running tests on other Java versions (such as Java 11 or Java 21). This is because the setup task only builds the container image specified by javaContainerSuffix (which is dynamic based on testJavaVersion). If the transform service tries to use 'java17' but only 'java11' was built, the test will fail with an image not found error.\n\nWe should make transformServiceJavaContainerSuffix dynamic by setting it to javaContainerSuffix so that it always matches the container version being built and tested.

      def transformServiceJavaContainerSuffix = javaContainerSuffix

Comment on lines 1633 to +1634
if (['11', '17', '21', '25'].contains(testJavaVersion)) {
def testJavaHome = project.getProperty("java${testJavaVersion}Home")
def testJavaHome = project.findProperty("java${testJavaVersion}Home")

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.

medium

If testJavaVersion is specified but the corresponding java${testJavaVersion}Home property is not defined, project.findProperty will return null. This can lead to a NullPointerException or IllegalArgumentException when configuring the compilation and test tasks later in this block.\n\nWe can make this safer by checking if the property is defined directly in the if condition.

      if (['11', '17', '21', '25'].contains(testJavaVersion) && project.findProperty("java${testJavaVersion}Home")) {\n        def testJavaHome = project.findProperty("java${testJavaVersion}Home")

ash6898 pushed a commit to ash6898/beam that referenced this pull request Jun 28, 2026
* try to fix forward with 17 only

* address just two workflows

* Revert XVR Spark3 workflow java-version override

* Add Java 17 and 11 setup and -Pjava17Home across all XVR workflows

* Revert redundant java-version override in TransformService Direct workflow
ash6898 pushed a commit to ash6898/beam that referenced this pull request Jun 29, 2026
* try to fix forward with 17 only

* address just two workflows

* Revert XVR Spark3 workflow java-version override

* Add Java 17 and 11 setup and -Pjava17Home across all XVR workflows

* Revert redundant java-version override in TransformService Direct workflow
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.

2 participants