This is an automated email from the ASF dual-hosted git repository.
zhengruifeng pushed a commit to branch branch-4.x
in repository https://gitbox.apache.org/repos/asf/spark.git
The following commit(s) were added to refs/heads/branch-4.x by this push:
new 129d8f7d40ee [SPARK-61016][INFRA] Remove workflow-side CI sampling on
branch-4.x
129d8f7d40ee is described below
commit 129d8f7d40eebccfe29df736818f19090a8879b5
Author: Ruifeng Zheng <[email protected]>
AuthorDate: Sun Nov 8 10:27:46 2026 +0800
[SPARK-61016][INFRA] Remove workflow-side CI sampling on branch-4.x
### What changes were proposed in this pull request?
Remove the commit-count sampling job and its downstream build gate from
`branch-4.x`'s `.github/workflows/build_main.yml`.
This completes the workflow-side cleanup for
[SPARK-61016](https://issues.apache.org/jira/browse/SPARK-61016) after #60177
moved sampling into the merge script on `master`. The merge script already
handles both `master` merges and `branch-4.x` backports. This PR changes only
the `branch-4.x` workflow.
### Why are the changes needed?
Keeping the old gate on `branch-4.x` duplicates the merge script's policy
and still starts a sampling job for pushes without a skip directive. Removing
it makes the merge script the single place to control sampling for both
branches. Unskipped pushes run the existing build directly; sampled-out pushes
use GitHub's workflow-skip commit trailer.
### Does this PR introduce _any_ user-facing change?
No. This changes CI scheduling only.
### How was this patch tested?
- `actionlint` v1.7.11 passed for `.github/workflows/build_main.yml`.
- Parsed the before/after YAML in `spark-dev-313` and verified that the
push trigger, build permissions, and reusable workflow are preserved, with only
the sampling job and dependent gate removed.
- `git diff --check` passed.
### Was this patch authored or co-authored using generative AI tooling?
Generated-by: Codex (GPT-6)
Closes #60202 from zhengruifeng/infra-branch4x-remove-ci-sampling-20261107.
Authored-by: Ruifeng Zheng <[email protected]>
Signed-off-by: Ruifeng Zheng <[email protected]>
---
.github/workflows/build_main.yml | 67 ++--------------------------------------
1 file changed, 2 insertions(+), 65 deletions(-)
diff --git a/.github/workflows/build_main.yml b/.github/workflows/build_main.yml
index 98c1fb85ef22..f499162f5994 100644
--- a/.github/workflows/build_main.yml
+++ b/.github/workflows/build_main.yml
@@ -25,73 +25,10 @@ on:
- '**'
jobs:
- check-commit-count:
- name: Check commit count
- runs-on: ubuntu-slim
- permissions:
- contents: read
- outputs:
- should-run: ${{ steps.count.outputs.should-run }}
- steps:
- - name: Check whether this is every tenth commit
- id: count
- env:
- GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- run: |
- count=$(gh api graphql \
- -f owner="$GITHUB_REPOSITORY_OWNER" \
- -f name="${GITHUB_REPOSITORY#*/}" \
- -f sha="$GITHUB_SHA" \
- -f query='
- query($owner: String!, $name: String!, $sha: GitObjectID!) {
- repository(owner: $owner, name: $name) {
- object(oid: $sha) {
- ... on Commit { history { totalCount } }
- }
- }
- }' \
- --jq '.data.repository.object.history.totalCount')
- if [[ ! "$count" =~ ^[1-9][0-9]*$ ]]; then
- echo "::error::Expected a positive commit count, got: $count"
- exit 1
- fi
- remainder=$((count % 10))
-
- if ((remainder == 0)); then
- should_run=true
- icon=":white_check_mark:"
- title="Commit count matched"
- details="Commit count $count is divisible by 10."
- else
- should_run=false
- icon=":pause_button:"
- title="Commit count not matched"
- details="Commit count $count is not divisible by 10."
- fi
-
- echo "should-run=$should_run" >> "$GITHUB_OUTPUT"
- echo "Branch: $GITHUB_REF_NAME"
- echo "Commit: $GITHUB_SHA"
- echo "Commit count: $count"
- echo "Remainder: $remainder"
- echo "Should run: $should_run"
- echo "Details: $details"
- echo "::notice title=$title::$details"
- echo "### $icon Commit count check" >> "$GITHUB_STEP_SUMMARY"
- echo "" >> "$GITHUB_STEP_SUMMARY"
- echo "- Branch: $GITHUB_REF_NAME" >> "$GITHUB_STEP_SUMMARY"
- echo "- Commit: $GITHUB_SHA" >> "$GITHUB_STEP_SUMMARY"
- echo "- Commit count: $count" >> "$GITHUB_STEP_SUMMARY"
- echo "- Remainder: $remainder" >> "$GITHUB_STEP_SUMMARY"
- echo "- Should run: $should_run" >> "$GITHUB_STEP_SUMMARY"
- echo "- Details: $details" >> "$GITHUB_STEP_SUMMARY"
-
call-build-and-test:
permissions:
packages: write
name: Run
- needs: check-commit-count
- if: >-
- github.repository != 'apache/spark'
- || needs.check-commit-count.outputs.should-run == 'true'
+ # Post-merge sampling on apache/spark branch-4.x is applied by
+ # dev/merge_spark_pr.py through GitHub's workflow-skip commit trailer.
uses: ./.github/workflows/build_and_test.yml
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]