Skip to content

ci: run PR CI in two lanes and clean runner disk only when short - #8368

Merged
oferchen merged 1 commit into
masterfrom
ci/two-lane-queue-conditional-disk-cleanup
Nov 11, 2026
Merged

oferchen merged 1 commit into
masterfrom
ci/two-lane-queue-conditional-disk-cleanup

Conversation

@oferchen

Copy link
Copy Markdown
Owner

Summary

These changes add more PR runs at once and shorter jobs. Every existing job, platform and toolchain cell stays as it is.

Two PR lanes instead of one.

  • Why: feat: local -vvv role traces and the oc-only PIPELINE debug word #8364's run (58 jobs, 437 runner-minutes, 86 minutes wall) kept about 5 of the 20 runners busy on average, with peaks of 10 Linux, 4 Windows and 2 macOS.
  • Change: pull requests now wait in two first-in-first-out lanes chosen by PR number parity (pr-queue-even / pr-queue-odd), so two PRs' runs share the pool. Within a lane nothing changes: queue: max, nothing is cancelled, and master pushes, the schedule and dispatch keep their own per-commit groups.
  • Where: ci.yml and the five other workflows that queued PRs (security, upstream-tarballs, interop-validation, iouring-kernel-compat, benchmark-tooling).
  • macOS: two runs fit in the 5 macOS runners.

Disk cleanup only when short.

  • Why: the "Free disk space" step ran in 35 Linux jobs per run, at 2-3 minutes each (44.5 runner-minutes per run). The runners now report /dev/root 145G, 107G available after it.
  • Change: a shared .github/actions/free-disk-space composite replaces the five copies of the step.
    • 40 GB or more free: it removes the unused toolchain directories in the background, so the job doesn't wait. The background removal is directories only, with no apt and no docker, so it never contends for the dpkg lock with a later apt-get install.
    • Less than 40 GB free: it runs the full cleanup before the build, as today. The nextest job keeps its extra apt-get remove list.

Measurements

From the run and job APIs.

Verification

  • python3 -m unittest tools/tests/test_uts_badge_workflows.py: 8 passed. The queue test now asserts the two-lane key.
  • tools/ci/check_pr_check_name_uniqueness.py: OK, 80 check names, each with one publisher.
  • actionlint shows the same findings before and after on all 7 touched workflows; only the known queue key and existing shellcheck style notes remain.
  • The concurrency group is read from the PR's merge commit, so this PR's own run uses the new lanes. A PR keeps the old single queue until it is rebased onto this change.

One pull request run keeps about 5 of the 20 runners busy on average
(peak 10 Linux, 4 Windows, 2 macOS on #8364's 58-job run), so the single
FIFO queue left most of the pool idle. Pull requests now wait in two FIFO
lanes chosen by PR number parity in every workflow that queued them.

The disk cleanup cost 44.5 runner-minutes per run (35 Linux jobs at 2-3
minutes each) on runners that now have 107 GB free after it. A shared
free-disk-space action checks free space first: at 40 GB or more it
removes the unused toolchain directories in the background and the job
continues; below that it runs the full cleanup before the build.
@github-actions github-actions Bot added the ci label Nov 11, 2026
@oferchen
oferchen merged commit dceb869 into master Nov 11, 2026
28 of 91 checks passed
@oferchen
oferchen deleted the ci/two-lane-queue-conditional-disk-cleanup branch November 11, 2026 08:35
oferchen added a commit that referenced this pull request Nov 11, 2026
One pull request run keeps about 5 of the 20 runners busy on average
(peak 10 Linux, 4 Windows, 2 macOS on #8364's 58-job run), so the single
FIFO queue left most of the pool idle. Pull requests now wait in two FIFO
lanes chosen by PR number parity in every workflow that queued them.

The disk cleanup cost 44.5 runner-minutes per run (35 Linux jobs at 2-3
minutes each) on runners that now have 107 GB free after it. A shared
free-disk-space action checks free space first: at 40 GB or more it
removes the unused toolchain directories in the background and the job
continues; below that it runs the full cleanup before the build.
oferchen added a commit that referenced this pull request Nov 17, 2026
One pull request run keeps about 5 of the 20 runners busy on average
(peak 10 Linux, 4 Windows, 2 macOS on #8364's 58-job run), so the single
FIFO queue left most of the pool idle. Pull requests now wait in two FIFO
lanes chosen by PR number parity in every workflow that queued them.

The disk cleanup cost 44.5 runner-minutes per run (35 Linux jobs at 2-3
minutes each) on runners that now have 107 GB free after it. A shared
free-disk-space action checks free space first: at 40 GB or more it
removes the unused toolchain directories in the background and the job
continues; below that it runs the full cleanup before the build.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant