This is an automated email from the ASF dual-hosted git repository.
uranusjr pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/airflow.git
The following commit(s) were added to refs/heads/main by this push:
new e42b5a92aeb Use prek hook script to refresh Java SDK metadata (#76714)
e42b5a92aeb is described below
commit e42b5a92aeb6d8c1a224958cbe498ae1774963da
Author: Tzu-ping Chung <[email protected]>
AuthorDate: Wed Nov 11 23:37:29 2026 +0800
Use prek hook script to refresh Java SDK metadata (#76714)
The "Java SDK refresh verification metadata" workflow used a plain
Gradle command, which only adds entries to the file, so the versions a
Dependabot bump replaced stayed in it, failing static checks.
The workflow now runs the prek hook's script instead. It also runs the
Dokka, source tarball, and publishToMavenLocal tasks the hook covers, so
the refreshed file is what the static check expects. If the script
fails, it puts the committed file back and the job fails before the
commit step.
---
.../workflows/java-sdk-dependabot-verification-metadata.yml | 13 ++++++++-----
1 file changed, 8 insertions(+), 5 deletions(-)
diff --git a/.github/workflows/java-sdk-dependabot-verification-metadata.yml
b/.github/workflows/java-sdk-dependabot-verification-metadata.yml
index 0dd460b5ef4..fb2125b5ce0 100644
--- a/.github/workflows/java-sdk-dependabot-verification-metadata.yml
+++ b/.github/workflows/java-sdk-dependabot-verification-metadata.yml
@@ -21,7 +21,9 @@
# trusted checksum and `./gradlew build` fails in java-sdk-release-verify.yml.
#
# This is a MANUAL job: a committer runs it from the Actions tab (or `gh
workflow
-# run`) with the PR number. It checks that PR out, regenerates the metadata,
and
+# run`) with the PR number. It checks that PR out, regenerates the metadata
with
+# the same script as the `regenerate-java-sdk-verification-metadata` prek hook
+# (so stale entries are dropped and Static checks agree with the result), and
# pushes the refreshed file back onto the PR branch. Being workflow_dispatch,
it
# runs with the committer's own trigger and the normal repo GITHUB_TOKEN -- no
# standing Dependabot secret or pull_request_target write token required.
@@ -84,11 +86,12 @@ jobs:
11
17
21
+ # Same script as the `regenerate-java-sdk-verification-metadata` prek
hook: it
+ # rewrites the file from an empty component list and resolves every task
the
+ # hook does. Plain `--write-verification-metadata` only appends, leaving
the
+ # superseded versions behind, and the hook then fails Static checks on
them.
- name: Regenerate verification-metadata.xml
- working-directory: java-sdk
- # `build` resolves the same configurations the release-verify check
does,
- # so every newly-bumped artifact gets a recorded sha256.
- run: ./gradlew --no-daemon --write-verification-metadata sha256 build
+ run: python3
scripts/ci/prek/regenerate_java_sdk_verification_metadata.py
- name: Commit and push if the metadata changed
env:
# Explicit token push: the checkout stores no credentials