wombatu-kun commented on code in PR #20652:
URL: https://github.com/apache/hudi/pull/20652#discussion_r4559389944


##########
.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:
   In a step, `cancelled()` reads this job's own status, and an `always()` job 
started after its run was cancelled still has a success status, so this term 
never fires for a queue run cancelled before its test jobs started. Such a run 
fails here because test jobs still pending at the cancel end up `cancelled`, so 
could the term go in both workflows, with the comment above the step and the 
`cancelled: () => true` test case saying that instead?



##########
.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:
   Skipping a docs-only entry's tests is safe only with `grouping_strategy: 
ALLGREEN` in `.asf.yaml`: under HEADGREEN, a docs-only entry at the head of a 
group would merge the code entries ahead of it on its own green run. Could 
`.asf.yaml` say so next to that setting, or a node test pin it?



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