comphead opened a new pull request, #22894:
URL: https://github.com/apache/datafusion/pull/22894

   ## Which issue does this PR close?
   
   <!--
   We generally require a GitHub issue to be filed for all bug fixes and 
enhancements and this helps us generate change logs for our releases. You can 
link an issue to this PR using the GitHub syntax. For example `Closes #123` 
indicates that this PR will close issue #123.
   -->
   
   - Closes #22864 .
   
   ## Rationale for this change
     
     **Problem.** Doc-only PRs (a typo fix in `README.md`, a release-note edit) 
trigger the full ~25-job Rust CI matrix in `rust.yml` and `dependencies.yml`. 
Wasted runner time and queue capacity for
     changes that can't break code.
   
     **Solution.** Adopt Apache Spark's gating pattern 
(`spark/.github/workflows/build_and_test.yml`): a single change-detection job, 
then per-job `if:`.
   
     - `rust.yml` and `dependencies.yml` each gain a `detect-changes` job that 
diffs the PR against an `IGNORE_CODE_CI_FOR_PATHS` glob list and emits 
`has_code`.
     - Every existing job in those workflows now declares `needs: 
detect-changes` and `if: needs.detect-changes.outputs.has_code == 'true'`.
     - Doc-only PR → those jobs report `skipped` (which GitHub branch 
protection treats as satisfying required status checks).
     - Code PR → identical to before, plus a sub-second detector.
   
     **Why per-job `if:` and not workflow-level `paths-ignore`.** The repo's 
`required_status_checks` list in `.asf.yaml` is incompatible with 
`paths-ignore` — `ci/scripts/check_asf_yaml_status_checks.py`
     explicitly rejects workflows that have it, because a workflow-level skip 
never reports a status, leaving required checks in "Expected" and blocking 
merge. A job-level `if: false` does report
     (`conclusion: skipped`), which is what unblocks doc-only PRs without 
weakening protection on code PRs.
     
     **Other workflows.** `codeql.yml`, `breaking_changes_detector.yml`, 
`large_files.yml` keep workflow-level `paths-ignore` since none are required 
checks. `extended.yml`, `audit.yml`, `docs_pr.yaml` were
     already path-filtered to the right files.
   
     **`.asf.yaml`.** One added context: `"Detect changes"`. The detector 
script is fail-open (any error → `has_code=true` → run full CI), so a transient 
git failure can't silently merge a broken PR; this
     required check makes a broken detector itself blocking


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