Skip to content

ci/build: Skip heavy build matrix on draft pull requests - #20973

Merged
xiaoxiang781216 merged 1 commit into
apache:masterfrom
Swatantra-66:ci/skip-build-on-draft
Oct 25, 2026
Merged

xiaoxiang781216 merged 1 commit into
apache:masterfrom
Swatantra-66:ci/skip-build-on-draft

Conversation

@Swatantra-66

Copy link
Copy Markdown
Contributor

Summary

Following the recent notice from ASF Infrastructure on the dev@ mailing list regarding runner resource consumption, this patch optimizes GitHub Actions usage by skipping the heavy Linux build matrix while a pull request is in Draft state.

  1. Added ready_for_review to on.pull_request.types in .github/workflows/build.yml so the full build matrix triggers automatically once the author marks the PR ready for review.
  2. Added if: github.event_name != 'pull_request' || !github.event.pull_request.draft to Fetch-Source, cascading the skip to all downstream matrix jobs.
  3. Fast checks (check.yml and lint.yml) continue to run on draft PRs to provide early style/syntax feedback without consuming matrix runners.

Pre-discussed with @acassis.

Impact

CI / Runners - Saves up to 28 concurrent matrix jobs for each push while a PR is in draft, immediately saving GitHub Actions runner capacity across the ASF.
Workflow - Zero impact on test coverage. The full matrix runs as soon as a PR is marked 'Ready for review'.

Testing

Verified workflow YAML syntax.
Verified git whitespace and clean diff against upstream/master.

In response to the ASF Infrastructure notice regarding excessive GitHub Actions runner consumption, skip the heavy build matrix when a pull request is in draft state.

Fast checks (check.yml and lint.yml) continue to run to provide early style and syntax feedback. The full build matrix will automatically trigger once the PR is marked 'Ready for review'.

Signed-off-by: Swatantra Yadav <[email protected]>
@github-actions github-actions Bot added Area: CI Size: XS The size of the change in this PR is very small labels Oct 24, 2026
@acassis

acassis commented Oct 24, 2026

Copy link
Copy Markdown
Contributor

Swatantra suggested not starting the CI for PR that are marked as Draft, I think this is a good idea reduce the CI workload.

@github-actions

Copy link
Copy Markdown

MemBrowse Memory Report · Explore what changed →

No memory changes detected for:


Catch memory regressions in CI with MemBrowse. Free for open source.

@xiaoxiang781216
xiaoxiang781216 merged commit b63e526 into apache:master Oct 25, 2026
44 of 52 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area: CI Size: XS The size of the change in this PR is very small

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants