You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@beam.apache.org by yh...@apache.org on 2024/08/15 02:40:21 UTC

(beam) branch fixhivejava11 updated (0bb504973e1 -> a0cff15e2f7)

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

yhu pushed a change to branch fixhivejava11
in repository https://gitbox.apache.org/repos/asf/beam.git


 discard 0bb504973e1 Fix tests after GHA runner Java11 migration
     new a0cff15e2f7 Fix tests after GHA runner Java11 migration

This update added new revisions after undoing existing revisions.
That is to say, some revisions that were in the old version of the
branch are not in the new version.  This situation occurs
when a user --force pushes a change and generates a repository
containing something like this:

 * -- * -- B -- O -- O -- O   (0bb504973e1)
            \
             N -- N -- N   refs/heads/fixhivejava11 (a0cff15e2f7)

You should already have received notification emails for all of the O
revisions, and so the following emails describe only the N revisions
from the common base, B.

Any revisions marked "omit" are not gone; other references still
refer to them.  Any revisions marked "discard" are gone forever.

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .github/workflows/beam_PostCommit_Java_Hadoop_Versions.yml | 1 +
 .github/workflows/beam_PreCommit_Java_IOs_Direct.yml       | 1 +
 2 files changed, 2 insertions(+)


(beam) 01/01: Fix tests after GHA runner Java11 migration

Posted by yh...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit a0cff15e2f7e40c177a0df567c8c972bb0d7f14e
Author: Yi Hu <ya...@google.com>
AuthorDate: Wed Aug 14 22:37:33 2024 -0400

    Fix tests after GHA runner Java11 migration
    
    * Still run HCatalogIO tests on Java8
    
    * Fix Python Flink validates runner test java container
---
 .github/workflows/beam_PostCommit_Java_Hadoop_Versions.yml | 13 +++++++++++--
 .github/workflows/beam_PreCommit_Java_IOs_Direct.yml       | 14 ++++++++++++++
 sdks/java/io/hcatalog/build.gradle                         | 13 ++++++++++++-
 sdks/python/test-suites/portable/common.gradle             |  5 ++++-
 4 files changed, 41 insertions(+), 4 deletions(-)

diff --git a/.github/workflows/beam_PostCommit_Java_Hadoop_Versions.yml b/.github/workflows/beam_PostCommit_Java_Hadoop_Versions.yml
index a4a1c3ea04f..ed0f0b808e6 100644
--- a/.github/workflows/beam_PostCommit_Java_Hadoop_Versions.yml
+++ b/.github/workflows/beam_PostCommit_Java_Hadoop_Versions.yml
@@ -73,11 +73,20 @@ jobs:
       - name: Setup environment
         uses: ./.github/actions/setup-environment-action
         with:
-          java-version: default
-      - name: run validatesRunner script
+          java-version: |
+            8
+            11
+      - name: run javaHadoopVersionsTest script
         uses: ./.github/actions/gradle-command-self-hosted-action
         with:
           gradle-command: :javaHadoopVersionsTest
+      # TODO(https://github.com/apache/beam/issues/32189) remove when embedded hive supports Java11
+      - name: run java8HadoopVersionsTest script
+        uses: ./.github/actions/gradle-command-self-hosted-action
+        with:
+          gradle-command: :sdks:java:io:hcatalog:hadoopVersionsTest \
+              -PtestJavaVersion=8 \
+              -Pjava8Home=$JAVA_HOME_8_X64 \
       - name: Archive JUnit Test Results
         uses: actions/upload-artifact@v4
         if: ${{ !success() }}
diff --git a/.github/workflows/beam_PreCommit_Java_IOs_Direct.yml b/.github/workflows/beam_PreCommit_Java_IOs_Direct.yml
index e16955fa46b..b084c48de04 100644
--- a/.github/workflows/beam_PreCommit_Java_IOs_Direct.yml
+++ b/.github/workflows/beam_PreCommit_Java_IOs_Direct.yml
@@ -86,6 +86,9 @@ jobs:
           github_job: ${{ matrix.job_name }} (${{ matrix.job_phrase }})
       - name: Setup environment
         uses: ./.github/actions/setup-environment-action
+        java-version: |
+          8
+          11
       - name: run Java IOs PreCommit script
         uses: ./.github/actions/gradle-command-self-hosted-action
         with:
@@ -94,6 +97,17 @@ jobs:
             -PdisableSpotlessCheck=true \
             -PdisableCheckStyle=true \
             -Dfile.encoding=UTF-8 \
+      # TODO(https://github.com/apache/beam/issues/32189) remove when embedded hive supports Java11
+      - name: run Java8 IOs PreCommit script
+        uses: ./.github/actions/gradle-command-self-hosted-action
+        with:
+          gradle-command: :sdks:java:io:hcatalog:build
+          arguments: |
+            -PdisableSpotlessCheck=true \
+            -PdisableCheckStyle=true \
+            -Dfile.encoding=UTF-8 \
+            -PtestJavaVersion=8 \
+            -Pjava17Home=$JAVA_HOME_8_X64 \
       - name: Archive JUnit Test Results
         uses: actions/upload-artifact@v4
         if: ${{ !success() }}
diff --git a/sdks/java/io/hcatalog/build.gradle b/sdks/java/io/hcatalog/build.gradle
index c333ad3bcc0..8e8db2d5d05 100644
--- a/sdks/java/io/hcatalog/build.gradle
+++ b/sdks/java/io/hcatalog/build.gradle
@@ -90,9 +90,20 @@ task hadoopVersionsTest(group: "Verification") {
 }
 
 hadoopVersions.each { kv ->
-  task "hadoopVersion${kv.key}Test"(type: Test, group: "Verification") {
+  tasks.create(name: "hadoopVersion${kv.key}Test", type: Test, group: "Verification") {
     description = "Runs HCatalog tests with Hadoop version $kv.value"
     classpath = configurations."hadoopVersion$kv.key" + sourceSets.test.runtimeClasspath
     include '**/*Test.class'
   }
 }
+
+project.tasks.withType(Test).configureEach {
+  if (JavaVersion.VERSION_1_8.compareTo(JavaVersion.current()) < 0) {
+    useJUnit {
+      filter {
+        excludeTestsMatching "org.apache.beam.sdk.io.hcatalog.HCatalogIOTest"
+        excludeTestsMatching "org.apache.beam.sdk.io.hcatalog.HCatalogBeamSchemaTest"
+      }
+    }
+  }
+}
diff --git a/sdks/python/test-suites/portable/common.gradle b/sdks/python/test-suites/portable/common.gradle
index c87696793f0..4f232c5b104 100644
--- a/sdks/python/test-suites/portable/common.gradle
+++ b/sdks/python/test-suites/portable/common.gradle
@@ -1,3 +1,5 @@
+import static org.apache.beam.gradle.BeamModulePlugin.getSupportedJavaVersion
+
 import org.apache.tools.ant.taskdefs.condition.Os
 
 /*
@@ -39,7 +41,8 @@ def createFlinkRunnerTestTask(String workerType) {
   task.configure {
     dependsOn ":runners:flink:${latestFlinkVersion}:job-server:shadowJar"
     // The Java SDK worker is required to execute external transforms.
-    dependsOn ':sdks:java:container:java8:docker'
+    def suffix = getSupportedJavaVersion()
+    dependsOn ":sdks:java:container:${suffix}:docker"
     if (workerType == 'DOCKER') {
       dependsOn pythonContainerTask
     } else if (workerType == 'PROCESS') {