gaogaotiantian opened a new pull request, #60261: URL: https://github.com/apache/spark/pull/60261
### What changes were proposed in this pull request? `dev/merge_spark_pr.py` now samples post-merge CI. On `master` and `branch-4.x`, it adds GitHub's `skip-checks: true` trailer to every commit except each 10th one, and prints a red warning when it does. This PR: 1. Reads the PR's GitHub labels. If the PR has the `do-not-skip-ci` label, the trailer is not added and post-merge CI runs. This covers the merge and every cherry-pick done in the same run, including backports of an already-merged PR. Branches with no configured interval are unchanged. 2. Prints the skip warning in yellow instead of red, and adds a hint about the label: ``` WARNING: Post-merge CI will be skipped on master because commit count 5 is not divisible by 10. GitHub's 'skip-checks: true' trailer will be added. To force post-merge CI to run, add the 'do-not-skip-ci' label to the PR and rerun this script. ``` With the label set, the script prints: ``` Post-merge CI will run on master: the PR has the 'do-not-skip-ci' label. ``` ### Why are the changes needed? Committers need a way to make sure post-merge CI runs for a risky change without changing the sampling interval. Skipping CI on most commits is expected, so the warning doesn't need to look like an error, and it should tell committers how to opt out. ### Does this PR introduce _any_ user-facing change? No. This only changes the committer-facing merge script. ### How was this patch tested? - The script's doctests pass (426 attempted, 0 failed). - `ruff format --check` and `ruff check` pass. - Called `should_skip_post_merge_ci` directly with a fake `git` for four cases: an off-interval commit without the label (skips, yellow warning), an off-interval commit with the label (runs), an on-interval commit (runs), and a branch with no interval (runs). ### Was this patch authored or co-authored using generative AI tooling? Generated-by: Claude Code (Opus 5.5) This pull request and its description were written by Isaac. -- 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] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
