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


##########
.github/workflows/validate_source.yml:
##########
@@ -20,21 +22,119 @@ concurrency:
   cancel-in-progress: ${{ !contains(github.ref, 'master') && 
!contains(github.ref, 'branch-0.x') && !contains(github.ref, 'release-') }}
 
 jobs:
-  # [CI-TRIM] to revisit for CI improvement
-  # This only blocks PRs whose checks predate the matrix trim (#19514). Since 
bot.yml and
-  # java_ci_engines.yml are path-filtered, a green result here no longer means 
any Java CI
-  # job ran; reviewers gate on the checks the PR shows. Delete under #19535.
+  # [CI-TRIM]
+  # The only required status check in .asf.yaml. The name is historical: PRs 
whose checks predate
+  # the matrix trim (#19514) never reported it, so they stay blocked until 
they re-run CI against
+  # the current workflows. Every other short check (PR metadata, source 
release) is folded in, so
+  # each PR event spends one runner. Renaming it would block every open PR 
until it re-runs CI,
+  # so keep the name even after #19535.
   validate-ci-baseline:
     runs-on: ubuntu-24.04
-    steps:
-      - name: Confirm CI ran against the reduced matrix
-        run: echo "Ran against the reduced CI matrix."
-
-  validate-source:
-    runs-on: ubuntu-24.04
+    env:
+      # The metadata checks only apply to PRs. release-* PRs (backports, "[DO 
NOT MERGE] Validate
+      # rc bundles") were never subject to them.
+      CHECK_PR_METADATA: ${{ github.event_name == 'pull_request' && 
!startsWith(github.base_ref, 'release-') }}
     steps:
       - uses: actions/checkout@v5
+
+      # PR metadata checks. Each takes seconds, so they share this job instead 
of spending a runner
+      # of their own. Every step from here on runs even when an earlier one 
fails, so one run
+      # reports every problem; the failed step's name says which check it was.
+      - name: Check PR description
+        if: ${{ env.CHECK_PR_METADATA == 'true' }}
+        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. The log goes to the runner temp dir: the 
source checks below
+      # copy and scan the workspace, and a stray test.log has no license 
header.
+      - name: Test pr_compliance.py
+        if: ${{ !cancelled() && env.CHECK_PR_METADATA == 'true' }}
+        run: python3 scripts/pr_compliance.py run-tests > 
"$RUNNER_TEMP/test.log" || { echo "::error::pr_compliance.py $(cat 
"$RUNNER_TEMP/test.log")" && exit 1; }
+
+      - name: Check for legacy PR title format using JIRA or MINOR
+        id: check-legacy-format
+        if: ${{ !cancelled() && env.CHECK_PR_METADATA == 'true' }}

Review Comment:
   Done in 4b3aa0c259ff, writes to `$RUNNER_TEMP/test.log`.



-- 
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