zhengruifeng opened a new pull request, #56185: URL: https://github.com/apache/spark/pull/56185
### What changes were proposed in this pull request? Replace the single `if:` skip-condition in `.github/workflows/build_main.yml` with a `gate` precondition job that decides whether to invoke the reusable `build_and_test.yml` workflow. The gate runs on `ubuntu-slim`, checks out the repo with `fetch-depth: 0`, and emits a `run` output: - on forks' `master` pushes: `run=false` (preserves the existing "Sync fork" skip) - on `apache/spark` `branch-4.x` pushes: `run=true` only when `git rev-list --count HEAD` is a multiple of 10 (every 10th post-merge commit) - everything else: `run=true` `call-build-and-test` then gates on `needs.gate.outputs.run == 'true'`. This PR lands the structure on `master`. The behavioral savings come from the equivalent change being backported to `branch-4.x`'s own `.github/workflows/build_main.yml` (where post-merge `Build` runs are read from). ### Why are the changes needed? Every post-merge commit on `branch-4.x` currently triggers the full `Build` workflow, which is the same matrix the master line already runs. Sampling every 10th post-merge commit saves CI resources while still catching regressions reasonably quickly. PRs targeting `branch-4.x` are unaffected: their CI runs on the contributor's fork, where `github.repository != 'apache/spark'` and the gate falls through to `run=true`. ### Does this PR introduce _any_ user-facing change? No. ### How was this patch tested? Workflow change; will be exercised by the gate job itself once merged. The logic is also verifiable by reading the bash conditions in `build_main.yml`. ### Was this patch authored or co-authored using generative AI tooling? Generated-by: Claude Opus 4.7 -- 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]
