voonhous commented on code in PR #18837:
URL: https://github.com/apache/hudi/pull/18837#discussion_r3629284548


##########
.github/workflows/hudi_trino_compat.yml:
##########
@@ -0,0 +1,101 @@
+name: Hudi Trino SPI Compatibility
+
+on:
+  schedule:
+    - cron: '17 4 * * *'
+  workflow_dispatch:
+
+# The failure handler files/updates a drift report issue.
+permissions:
+  contents: read
+  issues: write
+
+env:
+  MVN_ARGS: -e -ntp -B -V -Dgpg.skip -Djacoco.skip
+
+jobs:
+  compile-against-trino-master:
+    name: Compile hudi-trino against trinodb/trino master
+    runs-on: ubuntu-latest
+    steps:
+      - name: Checkout Hudi
+        uses: actions/checkout@v5
+        with:
+          path: hudi
+      - name: Checkout trinodb/trino master
+        uses: actions/checkout@v5
+        with:
+          repository: trinodb/trino
+          ref: master
+          path: trino
+      # Hudi targets Java 11 and uses Lombok 1.18.36, which does not run on 
JDK 25.
+      # Install the upstream Hudi modules under JDK 17 first, then compile the 
connector
+      # under JDK 25.
+      - name: Set up JDK 17
+        uses: actions/setup-java@v5
+        with:
+          java-version: '17'
+          distribution: 'temurin'
+          cache: maven
+      - name: Install upstream Hudi modules (JDK 17)
+        working-directory: hudi
+        run: mvn $MVN_ARGS install -pl 
:hudi-common,:hudi-hive-sync,:hudi-io,:hudi-sync-common -am 
-Dmaven.test.skip=true -Drat.skip -Dcheckstyle.skip
+      - name: Set up JDK 25
+        uses: actions/setup-java@v5
+        with:
+          java-version: '25'
+          distribution: 'temurin'
+          cache: maven
+      - name: Read Trino version
+        id: trino-version
+        working-directory: trino
+        run: |
+          set -euo pipefail
+          # Ask Maven for the project version rather than grepping the pom: 
the first <version> in
+          # trinodb/trino's root pom belongs to the <parent> 
(io.airlift:airbase), not to Trino.
+          # Keep the -SNAPSHOT suffix -- master's version is unreleased, so it 
only resolves against
+          # the artifacts installed from source in the next step.
+          VERSION=$(mvn -q -N help:evaluate -Dexpression=project.version 
-DforceStdout)
+          echo "trino_version=$VERSION" >> "$GITHUB_OUTPUT"
+          echo "Detected Trino version: $VERSION"
+      - name: Install Trino modules from master (JDK 25)
+        working-directory: trino
+        # hudi-trino compiles against these plus their transitive modules 
(spi, cache, metastore,
+        # hive-formats, memory-context). They must come from the master 
checkout -- resolving from
+        # Maven Central would defeat the point of the drift check.
+        run: mvn $MVN_ARGS install -pl 
:trino-hive,:trino-filesystem-manager,:trino-parquet,:trino-plugin-toolkit -am 
-DskipTests -Dair.check.skip-all=true
+      - name: Compile hudi-trino against current Trino SPI (JDK 25)
+        working-directory: hudi
+        run: |
+          mvn $MVN_ARGS -Phudi-trino \
+            -Dtrino.version=${{ steps.trino-version.outputs.trino_version }} \
+            -pl hudi-trino compile
+      - name: Open issue on failure
+        if: failure()

Review Comment:
   Fixed: compile step now has `id: compile` and the issue step is guarded with 
`failure() && steps.compile.outcome == 'failure'`, so a failed checkout or a 
broken trino master build no longer files a drift issue (nor one with an empty 
version).



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to