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


##########
.github/workflows/bot.yml:
##########
@@ -82,15 +84,68 @@ env:
 # UPSTREAM_OTHER_PUSH, a push to apache/hudi other than to master, release-* 
or branch-0.x:
 #   github.event_name == 'push' && github.repository == 'apache/hudi' && 
github.ref != 'refs/heads/master' && !startsWith(github.ref, 
'refs/heads/release-') && github.ref != 'refs/heads/branch-0.x'
 # Such branches back same-repository PRs, which test them through pull_request.
+#
+# DOCS_ONLY, a merge-queue entry that changes only docs and images:
+#   needs.changes.outputs.docs_only == 'true'
+# Every test job needs the `changes` job, which runs on merge_group only. On 
every other event it
+# is skipped, and a job whose need was skipped is skipped too unless its 
condition calls a status
+# function, so the route starts with `!cancelled()`. A failed `changes` job 
leaves the output
+# empty, so the test jobs run.
 jobs:
+  # Decides on a merge-queue run whether the entry changes only docs and 
images, so that the test
+  # jobs can skip; see DOCS_ONLY above. The excluded patterns are the negated 
patterns of the push
+  # filter at the top of this file: `!**.md` becomes `**/*.md`, which also 
matches at the root, and
+  # `!.gitignore` stays root only. The job fetches the two commits without 
blobs instead of
+  # checking out the repository, and diffs their trees. Keep it identical in 
bot.yml and
+  # java_ci_engines.yml; .github/ci/scripts/test-fork-ci-status.cjs checks 
both and runs it.
+  changes:

Review Comment:
   Pinned with a node test in b1eb255d: `test-fork-ci-status.cjs` asserts the 
merge-queue rule's `grouping_strategy` is `ALLGREEN`, with the reason in the 
assertion message, and the aggregate comment in both workflows says the same. I 
left `.asf.yaml` itself alone: any edit there re-applies branch protection on 
merge, which has failed with HTTP 502 at our current open-PR count.
   



##########
.github/workflows/bot.yml:
##########
@@ -1034,12 +1099,16 @@ jobs:
             printf 'Look for commit `%s`. Enable Actions in your fork and push 
your branch if no run exists.\n\n' "$PR_HEAD_SHA"
             printf 'This upstream PR run skips the Java CI test jobs. The 
merge queue runs them on ASF runners before merge.\n'
           } >> "$GITHUB_STEP_SUMMARY"
+      # On merge_group, skipped jobs pass only when every job skipped, which 
means DOCS_ONLY; see
+      # the comment above this job. cancelled() keeps a queue run cancelled 
before its test jobs
+      # started from passing as docs-only.
       - name: Fail unless every job succeeded
         if: >-
           ${{ env.FORK_PR == 'true' && (contains(needs.*.result, 'success') || 
contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled'))
-          || env.FORK_PR != 'true' && (contains(needs.*.result, 'failure') || 
contains(needs.*.result, 'cancelled') || contains(needs.*.result, 'skipped')) }}
+          || env.FORK_PR != 'true' && (contains(needs.*.result, 'failure') || 
contains(needs.*.result, 'cancelled')
+          || contains(needs.*.result, 'skipped') && !(github.event_name == 
'merge_group' && !cancelled() && !contains(needs.*.result, 'success'))) }}

Review Comment:
   Dropped the term in both workflows in b1eb255d. The step comment now says a 
queue run cancelled before its test jobs started fails on their `cancelled` 
results, and why `cancelled()` cannot catch it; the test asserts an 
all-`cancelled` queue run fails instead of stubbing `cancelled()`.
   



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