zhengruifeng opened a new pull request, #59913:
URL: https://github.com/apache/spark/pull/59913

   ### What changes were proposed in this pull request?
   
   Move the existing one-in-ten post-merge sampling check on `branch-4.x` from 
`Build` into a separate `Sample post-merge Build` workflow. The sampler 
dispatches `build_main.yml` only for selected commits, so skipped commits 
appear in the sampler's history rather than as successful Build runs.
   
   - Exclude direct `branch-4.x` pushes from Build and add a 
`workflow_dispatch` entry point. Build keeps its current workflow file and name.
   - Pass the selected SHA, original push base, and commit subject to Build. 
Pin the source checkout and use its `HEAD` for change detection, so a newer 
branch tip cannot change the selected workload.
   - Preserve unsampled fork CI: ordinary fork branches still build on push, 
and the sampler dispatches every push to a fork's `branch-4.x`.
   
   This PR targets `branch-4.x` only. Other upstream branches keep their 
existing workflow definitions.
   
   GitHub associates a dispatched run with the branch tip at dispatch time. If 
the branch advances while the sampler runs, that metadata can differ from the 
selected commit; the run title includes the selected SHA and the source 
checkout remains pinned to it.
   
   ### Why are the changes needed?
   
   Following #57841, roughly nine out of ten post-merge Build runs are green 
even though the test workload was skipped. This makes the Build history and 
status badge misleading. Keeping sampling in a separate workflow makes Build 
results represent actual executions while retaining the existing sampling rate 
and selection diagnostics from #57853.
   
   ### Does this PR introduce _any_ user-facing change?
   
   No. This changes CI reporting and workflow triggering only.
   
   ### How was this patch tested?
   
   - `actionlint` 1.7.12 passed for the three affected workflow files 
(shellcheck and pyflakes integrations disabled because they are not installed).
   - Checked YAML/Python syntax, whitespace, ASCII, and newly introduced Python 
line lengths.
   - Ran isolated workflow checks for commit counts 9, 10, 11, and 100, and 
mocked the dispatch API for upstream and fork contexts.
   - Used a temporary Git repository with a selected graphx commit and a later 
streaming commit to verify that change detection uses the checked-out commit 
even when `GITHUB_SHA` identifies the later commit.
   
   No full Spark build was run. Live dispatch in `apache/spark` has not been 
exercised.
   
   ### Was this patch authored or co-authored using generative AI tooling?
   
   Generated-by: OpenAI Codex (GPT-6)
   


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

Reply via email to