voonhous commented on code in PR #19642:
URL: https://github.com/apache/hudi/pull/19642#discussion_r3793859891
##########
.github/workflows/hudi_trino_compat.yml:
##########
@@ -5,10 +5,12 @@ on:
- cron: '17 4 * * *'
workflow_dispatch:
-# The failure handler files/updates a drift report issue.
+# The failure handler files/updates a drift report issue; on success the job
pushes the
+# pin-advance branch and opens its PR.
permissions:
- contents: read
+ contents: write
Review Comment:
Good catch -- split into two jobs in 00c42eebfa51: the build job (the one
running `mvnw` from the trino checkout) now holds `contents: read` + `issues:
write` only, and the push credential moved to a separate `propose-pin-advance`
job that checks out apache/hudi alone and runs no third-party code. Will raise
the bot-branch-on-canonical-repo question on dev@ before this merges.
##########
.github/workflows/hudi_trino_compat.yml:
##########
@@ -59,18 +68,61 @@ jobs:
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
+ # Same module set the pinned build uses, so a green compile here is a
promotable pin. The
+ # script purges ~/.m2/repository/io/trino itself and only warns when
master's version has
+ # rolled past the pinned trino.version.
+ env:
+ HEAD_SHA: ${{ steps.trino-head.outputs.head_sha }}
+ run: hudi/scripts/trino/bootstrap_trino.sh trino --skip-checkout --ref
"$HEAD_SHA"
- name: Compile hudi-trino against current Trino SPI (JDK 25)
id: compile
working-directory: hudi
run: |
mvn $MVN_ARGS -Phudi-trino \
-Dtrino.version=${{ steps.trino-version.outputs.trino_version }} \
-pl hudi-trino compile
+ - name: Save Trino artifacts under the candidate pin
+ # Pre-seeds the gating CI cache, which keys on the sha, so the pin
advance below does not
+ # make every PR rebuild Trino from source.
+ if: steps.compile.outcome == 'success'
+ uses: actions/cache/save@v4
+ with:
+ path: ~/.m2/repository/io/trino
+ key: trino-m2-v1-${{ steps.trino-head.outputs.head_sha }}
+ - name: Propose pin advance
+ # Pin PRs are human-merged by policy. Org settings may forbid
GITHUB_TOKEN from creating
+ # PRs; the branch still lands and the PR is then opened by hand.
+ working-directory: hudi
+ env:
+ GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+ HEAD_SHA: ${{ steps.trino-head.outputs.head_sha }}
+ TRINO_VERSION: ${{ steps.trino-version.outputs.trino_version }}
+ BASE_BRANCH: ${{ github.ref_name }}
+ run: |
+ set -euo pipefail
+ PINNED_VERSION=$(sed -n
's|.*<trino.version>\(.*\)</trino.version>.*|\1|p' pom.xml)
+ git config user.name 'github-actions[bot]'
+ git config user.email
'41898282+github-actions[bot]@users.noreply.github.com'
+ git checkout -B bot/trino-pin
+ sed -i
"s|<trino.sha>.*</trino.sha>|<trino.sha>${HEAD_SHA}</trino.sha>|" pom.xml
Review Comment:
Done in 00c42eebfa51: the propose job now also seds `trino.e2e.version` to
`repos/trinodb/trino/releases/latest` (best-effort -- an API hiccup leaves it
unchanged rather than blocking the pin advance), and the pom comment + module
README now name the nightly job as the owner.
--
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]