You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@beam.apache.org by xq...@apache.org on 2025/07/17 21:07:48 UTC

(beam) branch master updated: Fix Java version test for Legacy Dataflow (#35619)

This is an automated email from the ASF dual-hosted git repository.

xqhu pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/beam.git


The following commit(s) were added to refs/heads/master by this push:
     new 43900635d97 Fix Java version test for Legacy Dataflow (#35619)
43900635d97 is described below

commit 43900635d97a98f08305eeef6dabf7adbe73e638
Author: Yi Hu <ya...@google.com>
AuthorDate: Thu Jul 17 17:07:42 2025 -0400

    Fix Java version test for Legacy Dataflow (#35619)
---
 ..._PostCommit_Java_ValidatesRunner_Dataflow_JavaVersions.json |  2 +-
 runners/google-cloud-dataflow-java/build.gradle                | 10 +++++++---
 2 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/.github/trigger_files/beam_PostCommit_Java_ValidatesRunner_Dataflow_JavaVersions.json b/.github/trigger_files/beam_PostCommit_Java_ValidatesRunner_Dataflow_JavaVersions.json
index b970762c839..e3d6056a5de 100644
--- a/.github/trigger_files/beam_PostCommit_Java_ValidatesRunner_Dataflow_JavaVersions.json
+++ b/.github/trigger_files/beam_PostCommit_Java_ValidatesRunner_Dataflow_JavaVersions.json
@@ -1,4 +1,4 @@
 {
   "comment": "Modify this file in a trivial way to cause this test suite to run",
-  "https://github.com/apache/beam/pull/31156": "noting that PR #31156 should run this test"
+  "modification": 1
 }
diff --git a/runners/google-cloud-dataflow-java/build.gradle b/runners/google-cloud-dataflow-java/build.gradle
index 90d388b8bb6..3c2550be73c 100644
--- a/runners/google-cloud-dataflow-java/build.gradle
+++ b/runners/google-cloud-dataflow-java/build.gradle
@@ -164,10 +164,16 @@ def legacyPipelineOptions = [
   "--region=${gcpRegion}",
   "--tempRoot=${dataflowValidatesTempRoot}",
   "--dataflowWorkerJar=${dataflowLegacyWorkerJar}",
-  "--workerHarnessContainerImage=",
   "--experiments=enable_lineage"
 ]
 
+// For the following test tasks using legacy worker, set workerHarnessContainerImage to empty to
+// make Dataflow pick up the non-versioned container image, which handles a staged worker jar,
+// unless testJavaVersion is specified, then the client picks up the current beam-master container.
+if (!project.hasProperty('testJavaVersion')) {
+  legacyPipelineOptions += ["--workerHarnessContainerImage="]
+}
+
 def runnerV2PipelineOptions = [
   "--runner=TestDataflowRunner",
   "--project=${gcpProject}",
@@ -209,8 +215,6 @@ def commonRunnerV2ExcludeCategories = [
         'org.apache.beam.sdk.testing.UsesBoundedTrieMetrics', // Dataflow QM as of now does not support returning back BoundedTrie in metric result.
 ]
 
-// For the following test tasks using legacy worker, set workerHarnessContainerImage to empty to
-// make Dataflow pick up the non-versioned container image, which handles a staged worker jar.
 def createLegacyWorkerValidatesRunnerTest = { Map args ->
   def name = args.name
   def pipelineOptions = args.pipelineOptions ?: legacyPipelineOptions