This is an automated email from the ASF dual-hosted git repository.
voonhous pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/hudi.git
The following commit(s) were added to refs/heads/master by this push:
new 7ad42f1c7ad6 chore(ci): run all PR metadata checks in one job (#20375)
7ad42f1c7ad6 is described below
commit 7ad42f1c7ad670a16683d771f946dd1afb0ae10f
Author: voonhous <[email protected]>
AuthorDate: Mon Oct 19 19:28:39 2026 +0800
chore(ci): run all PR metadata checks in one job (#20375)
pr_compliance, pr_title_validation, commit_coauthor_validation and
update_pr_compliance each started a runner for a check that takes
seconds. Run them as steps of a single validate-pr job in
pr_validation.yml. Every check step runs even if an earlier one fails,
so a run still reports each problem.
The pr_compliance.py self-tests take about 30 ms, so they now run on
every PR instead of behind a paths filter.
---
.github/workflows/README.md | 3 +-
.github/workflows/commit_coauthor_validation.yml | 38 -------
.github/workflows/pr_compliance.yml | 23 ----
.github/workflows/pr_title_validation.yml | 70 -------------
.github/workflows/pr_validation.yml | 128 +++++++++++++++++++++++
.github/workflows/update_pr_compliance.yml | 23 ----
6 files changed, 129 insertions(+), 156 deletions(-)
diff --git a/.github/workflows/README.md b/.github/workflows/README.md
index b13d8ec19eda..fd2a178ea9f8 100644
--- a/.github/workflows/README.md
+++ b/.github/workflows/README.md
@@ -4,5 +4,4 @@ When updating the pr template, you must consider if updates
need to be made to s
## What are the files in workflows?
- bot.yml: runs the hudi unit tests against the scala, spark, and flink
versions in its CI matrix. That matrix is currently cut down to one
configuration per area to reduce runner usage; the jobs and matrix entries it
dropped are commented out in place and marked `[CI-TRIM]`
-- pr_compliance.yml: checks pr titles and main comment to make sure that
everything is filled out and formatted properly
-- update_pr_compliance: runs the pr_compliance tests when
scripts/pr_compliance.py is updated
+- pr_validation.yml: one job (`validate-pr`) that checks the PR description
with scripts/pr_compliance.py, runs that script's own tests, validates the PR
title, and rejects commits with a Claude co-author trailer
diff --git a/.github/workflows/commit_coauthor_validation.yml
b/.github/workflows/commit_coauthor_validation.yml
deleted file mode 100644
index 765b64315125..000000000000
--- a/.github/workflows/commit_coauthor_validation.yml
+++ /dev/null
@@ -1,38 +0,0 @@
-name: Commit Co-author Validation
-
-on:
- pull_request:
- types: [opened, reopened, synchronize]
- branches:
- - master
- - branch-0.x
-
-concurrency:
- group: commit-coauthor-validation-${{ github.ref }}
- cancel-in-progress: ${{ !contains(github.ref, 'master') &&
!contains(github.ref, 'branch-0.x') }}
-
-jobs:
- validate-commit-coauthor:
- runs-on: ubuntu-latest
- steps:
- - name: Check commits for Claude co-author trailers
- env:
- GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- REPO: ${{ github.repository }}
- PR_NUMBER: ${{ github.event.pull_request.number }}
- run: |
- echo "Checking commits of PR #${PR_NUMBER} for Claude co-author
trailers..."
- flagged=$(gh api "repos/${REPO}/pulls/${PR_NUMBER}/commits"
--paginate \
- --jq '.[] | select(.commit.message |
test("(^|\\n)co-authored-by:\\s*(claude\\s+(opus|sonnet|haiku|fable|mythos|instant|code|[0-9])|[^\\n]*<noreply@anthropic\\.com>)";
"i")) | .sha')
-
- if [[ -n "$flagged" ]]; then
- echo "❌ The following commits contain a Claude co-author trailer:"
- echo "$flagged"
- echo ""
- echo "Commits must not credit Claude as a co-author."
- echo "Remove the 'Co-authored-by: Claude ...' trailer from the
commit message(s),"
- echo "e.g., by amending the commit or rebasing, and force-push the
branch."
- exit 1
- fi
-
- echo "✅ No Claude co-author trailers found."
diff --git a/.github/workflows/pr_compliance.yml
b/.github/workflows/pr_compliance.yml
deleted file mode 100644
index a16de677923f..000000000000
--- a/.github/workflows/pr_compliance.yml
+++ /dev/null
@@ -1,23 +0,0 @@
-name: PR Compliance
-on:
- pull_request:
- types: [opened, edited, reopened, synchronize]
- branches:
- - master
- - branch-0.x
-
-concurrency:
- group: pr-compliance-${{ github.ref }}
- cancel-in-progress: ${{ !contains(github.ref, 'master') &&
!contains(github.ref, 'branch-0.x') }}
-
-jobs:
- validate-pr:
- runs-on: ubuntu-latest
- env:
- REQUEST_BODY: ${{ github.event.pull_request.body }}
- REQUEST_TITLE: ${{ github.event.pull_request.title }}
- steps:
- - uses: actions/checkout@v3
- - uses: actions/setup-python@v3
- - name: run script
- run: python3 scripts/pr_compliance.py
diff --git a/.github/workflows/pr_title_validation.yml
b/.github/workflows/pr_title_validation.yml
deleted file mode 100644
index 5926843779f4..000000000000
--- a/.github/workflows/pr_title_validation.yml
+++ /dev/null
@@ -1,70 +0,0 @@
-name: PR Title Validation
-
-on:
- pull_request:
- types: [opened, edited, reopened, synchronize]
- branches:
- - master
- - branch-0.x
-
-concurrency:
- group: pr-title-validation-${{ github.ref }}
- cancel-in-progress: ${{ !contains(github.ref, 'master') &&
!contains(github.ref, 'branch-0.x') }}
-
-jobs:
- validate-pr-title:
- runs-on: ubuntu-latest
- steps:
- - name: Check for legacy PR title format using JIRA or MINOR
- id: check-legacy-format
- env:
- PR_TITLE: ${{ github.event.pull_request.title }}
- run: |
- title="$PR_TITLE"
- echo "Checking PR title: $title"
-
- # Check for HUDI JIRA format: [HUDI-1234] description
- if [[ "$title" =~ ^\[HUDI-[0-9]+\]\ .+ ]]; then
- echo "✅ Title matches HUDI JIRA format"
- echo "skip_conventional=true" >> $GITHUB_OUTPUT
- exit 0
- fi
-
- # Check for MINOR format: [MINOR] description
- if [[ "$title" =~ ^\[MINOR\]\ .+ ]]; then
- echo "✅ Title matches MINOR format"
- echo "skip_conventional=true" >> $GITHUB_OUTPUT
- exit 0
- fi
-
- echo "Title does not match JIRA/MINOR format, will validate as
conventional commit"
- echo "skip_conventional=false" >> $GITHUB_OUTPUT
-
- - name: Validate PR title with Conventional Commits spec
- if: steps.check-legacy-format.outputs.skip_conventional == 'false'
- uses:
amannn/action-semantic-pull-request@48f256284bd46cdaab1048c3721360e808335d50 #
v6
- env:
- GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- with:
- types: |
- feat
- fix
- docs
- style
- refactor
- perf
- test
- chore
- requireScope: false
- # Disable subject case validation to be more permissive
- subjectPattern: ^.+$
- subjectPatternError: |
- The subject "{subject}" found in the pull request title "{title}"
- is empty. Please provide a meaningful description.
- # Allow ignoring certain labels
- ignoreLabels: |
- bot
- ignore-semantic-pull-request
- validateSingleCommit: false
- headerPattern: '^(\w+)(?:\(([^)]+)\))?!?: (.+)$'
- headerPatternCorrespondence: type,scope,subject
diff --git a/.github/workflows/pr_validation.yml
b/.github/workflows/pr_validation.yml
new file mode 100644
index 000000000000..c032ab5754ed
--- /dev/null
+++ b/.github/workflows/pr_validation.yml
@@ -0,0 +1,128 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+name: PR Validation
+
+on:
+ pull_request:
+ types: [opened, edited, reopened, synchronize]
+ branches:
+ - master
+ - branch-0.x
+
+concurrency:
+ group: pr-validation-${{ github.ref }}
+ cancel-in-progress: ${{ !contains(github.ref, 'master') &&
!contains(github.ref, 'branch-0.x') }}
+
+jobs:
+ # All PR metadata checks share one job: each takes seconds, so a job per
check spent more on
+ # runner startup than on the check itself. Every check step runs even when
an earlier one
+ # fails, so one run reports every problem; the failed step's name says which
check it was.
+ validate-pr:
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v5
+
+ - name: Check PR description
+ env:
+ REQUEST_BODY: ${{ github.event.pull_request.body }}
+ REQUEST_TITLE: ${{ github.event.pull_request.title }}
+ run: python3 scripts/pr_compliance.py
+
+ # Seconds of stdlib-only unit tests, so they run on every PR instead of
path-filtering
+ # on scripts/pr_compliance.py.
+ - name: Test pr_compliance.py
+ if: ${{ !cancelled() }}
+ run: python3 scripts/pr_compliance.py run-tests > test.log || { echo
"::error::pr_compliance.py $(cat test.log)" && exit 1; }
+
+ - name: Check for legacy PR title format using JIRA or MINOR
+ id: check-legacy-format
+ if: ${{ !cancelled() }}
+ env:
+ PR_TITLE: ${{ github.event.pull_request.title }}
+ run: |
+ title="$PR_TITLE"
+ echo "Checking PR title: $title"
+
+ # Check for HUDI JIRA format: [HUDI-1234] description
+ if [[ "$title" =~ ^\[HUDI-[0-9]+\]\ .+ ]]; then
+ echo "Title matches HUDI JIRA format"
+ echo "skip_conventional=true" >> $GITHUB_OUTPUT
+ exit 0
+ fi
+
+ # Check for MINOR format: [MINOR] description
+ if [[ "$title" =~ ^\[MINOR\]\ .+ ]]; then
+ echo "Title matches MINOR format"
+ echo "skip_conventional=true" >> $GITHUB_OUTPUT
+ exit 0
+ fi
+
+ echo "Title does not match JIRA/MINOR format, will validate as
conventional commit"
+ echo "skip_conventional=false" >> $GITHUB_OUTPUT
+
+ - name: Validate PR title with Conventional Commits spec
+ if: ${{ !cancelled() &&
steps.check-legacy-format.outputs.skip_conventional == 'false' }}
+ uses:
amannn/action-semantic-pull-request@48f256284bd46cdaab1048c3721360e808335d50 #
v6
+ env:
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+ with:
+ types: |
+ feat
+ fix
+ docs
+ style
+ refactor
+ perf
+ test
+ chore
+ requireScope: false
+ # Disable subject case validation to be more permissive
+ subjectPattern: ^.+$
+ subjectPatternError: |
+ The subject "{subject}" found in the pull request title "{title}"
+ is empty. Please provide a meaningful description.
+ # Allow ignoring certain labels
+ ignoreLabels: |
+ bot
+ ignore-semantic-pull-request
+ validateSingleCommit: false
+ headerPattern: '^(\w+)(?:\(([^)]+)\))?!?: (.+)$'
+ headerPatternCorrespondence: type,scope,subject
+
+ - name: Check commits for Claude co-author trailers
+ if: ${{ !cancelled() }}
+ env:
+ GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+ REPO: ${{ github.repository }}
+ PR_NUMBER: ${{ github.event.pull_request.number }}
+ run: |
+ echo "Checking commits of PR #${PR_NUMBER} for Claude co-author
trailers..."
+ flagged=$(gh api "repos/${REPO}/pulls/${PR_NUMBER}/commits"
--paginate \
+ --jq '.[] | select(.commit.message |
test("(^|\\n)co-authored-by:\\s*(claude\\s+(opus|sonnet|haiku|fable|mythos|instant|code|[0-9])|[^\\n]*<noreply@anthropic\\.com>)";
"i")) | .sha')
+
+ if [[ -n "$flagged" ]]; then
+ echo "The following commits contain a Claude co-author trailer:"
+ echo "$flagged"
+ echo ""
+ echo "Commits must not credit Claude as a co-author."
+ echo "Remove the 'Co-authored-by: Claude ...' trailer from the
commit message(s),"
+ echo "e.g., by amending the commit or rebasing, and force-push the
branch."
+ exit 1
+ fi
+
+ echo "No Claude co-author trailers found."
diff --git a/.github/workflows/update_pr_compliance.yml
b/.github/workflows/update_pr_compliance.yml
deleted file mode 100644
index 76eb338a0a88..000000000000
--- a/.github/workflows/update_pr_compliance.yml
+++ /dev/null
@@ -1,23 +0,0 @@
-name: Update PR Compliance
-
-on:
- pull_request:
- types: [opened, edited, reopened, synchronize]
- branches:
- - master
- - branch-0.x
- paths:
- - scripts/pr_compliance.py
-
-concurrency:
- group: update-pr-compliance-${{ github.ref }}
- cancel-in-progress: ${{ !contains(github.ref, 'master') &&
!contains(github.ref, 'branch-0.x') }}
-
-jobs:
- run-tests:
- runs-on: ubuntu-latest
- steps:
- - uses: actions/checkout@v3
- - uses: actions/setup-python@v3
- - name: run script
- run: python3 scripts/pr_compliance.py run-tests > test.log || { echo
"::error::pr_compliance.py $(cat test.log)" && exit 1; }