Skip to content

ci: give PR builds one darwin aarch64 test lane that any mac agent can take - #39195

Merged
alii merged 1 commit into
mainfrom
ci/darwin-pr-any-lane
Aug 15, 2026
Merged

alii merged 1 commit into
mainfrom
ci/darwin-pr-any-lane

Conversation

@alii

@alii alii commented Aug 15, 2026

Copy link
Copy Markdown
Member

#39191 took darwin tests off PR builds because the version-specific lanes were queueing for hours. The arm64 pool is not actually short of capacity for PR volume; it is fragmented: the agents behind the 26 lane sit mostly idle (that lane is main-only) while the 14 lane backs up.

This gives PR builds one untiered darwin aarch64 test lane whose agent selector is just queue=test-darwin, os=darwin, arch=aarch64, so every arm64 mac agent serves it regardless of macOS version. main, manual builds and [macos tests] commits keep the three version-specific lanes. getTestAgent only emits release-tier when a tier is set, and the untiered lane sets no EXPECTED_PLATFORM_RELEASE, so the runner's platform assert checks os/arch only.

--dry-run:

PR:   darwin-aarch64-any-test-bun  agents={queue: test-darwin, os: darwin, arch: aarch64}                         depends_on=darwin-aarch64-build-bun  parallelism=2
main: darwin-aarch64-26-test-bun   agents={..., release-tier: latest}    EXPECTED_PLATFORM_RELEASE=26
      darwin-aarch64-14-test-bun   agents={..., release-tier: previous}
      darwin-x64-14-test-bun       agents={queue: test-darwin, os: darwin, arch: x64}

…n take

PRs lost darwin tests entirely in #39191 because the version-specific
lanes queue for hours. Capacity is not actually short, it is fragmented:
the 26 lane's agents sit idle on PR-heavy days while the 14 lane backs
up. So PR builds now get a single untiered aarch64 lane (no release-tier
selector) that every arm64 mac agent serves; main, manual and
[macos tests] builds keep the 26 / 14 / x64 lanes for version coverage.

No-Verification-Needed: pipeline generator only; checked with --dry-run
@coderabbitai

coderabbitai Bot commented Aug 15, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

You’ve reached a temporary PR review limit under our Fair Usage Limits Policy.

Your recent review volume is higher than typical usage, so adaptive limits are currently applied.

Next review available in: 24 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: 4df2a9b1-3aca-4639-ba19-47753cf1c4e6

📥 Commits

Reviewing files that changed from the base of the PR and between 5448c1e and 473820b.

📒 Files selected for processing (1)
  • .buildkite/ci.mjs

Comment @coderabbitai help to get the list of available commands.

@robobun

robobun commented Aug 15, 2026

Copy link
Copy Markdown
Collaborator
Updated 11:52 AM PT - Aug 15th, 2026

@alii, your commit 473820b is building: #98548

@alii
alii merged commit 5998546 into main Aug 15, 2026
7 of 8 checks passed
@alii
alii deleted the ci/darwin-pr-any-lane branch August 15, 2026 18:54

@claude claude Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM — small, self-contained follow-up to #39191 that re-enables one untiered darwin aarch64 test lane on PR builds.

What was reviewed:

  • Traced the new {os: "darwin", arch: "aarch64", release: "any"} platform through getTestBunStep: depends_on/--step resolve to darwin-aarch64-build-bun (matches the cross-compiled build lane), getTestAgent now omits release-tier when tier is unset, and EXPECTED_PLATFORM_RELEASE is not emitted (its condition requires tier === "latest").
  • Confirmed .concat only adds the untiered lane when !darwinTestsEnabled, so main/manual/[macos tests] keep the three tiered lanes unchanged and the release step's testStepKeys never picks up the PR-only lane.
  • Checked getImageKey on the new platform — darwin is filtered from imagePlatforms, so no spurious build-image dependency; step/group keys (darwin-aarch64-any) don't collide with anything on PR builds.
Extended reasoning...

Overview

This PR modifies .buildkite/ci.mjs only. It is a direct follow-up to #39191, which took all darwin test lanes off PR builds because version-tiered agent targeting was fragmenting the mac pool. This change re-introduces exactly one darwin aarch64 test lane on PR builds, but with no release-tier agent selector so any arm64 mac agent can pick it up. Main branch, manual builds, and [macos tests] opt-in commits keep the existing three version-specific lanes unchanged.

The concrete edits: (1) getTestAgent now spreads release-tier only when tier is truthy (previously unconditionally for aarch64), (2) a new prDarwinTestPlatforms list with one untiered entry, (3) relevantTestPlatforms concats that list when darwinTestsEnabled is false, and (4) the comment above testPlatforms is updated to describe the new arrangement.

Security risks

None. This is CI pipeline-generation code that produces Buildkite YAML; no user-controlled input, no auth/crypto/permissions surface. The commit-message regex parsing already existed and is unchanged.

Level of scrutiny

Low-to-medium. It's a config-shape change to pipeline generation, verified by the author via --dry-run (output pasted in the PR description matches what tracing the code produces). The blast radius is limited to which test lanes appear on PR builds; main-branch behavior is provably unchanged because darwinTestsEnabled is true whenever isMainBranch(), so the concat contributes nothing and the tiered-lane filter keeps all three darwin entries.

I traced every consumer of the new platform object: getTargetKey → darwin-aarch64 correctly matches the existing build step; getPlatformKey → darwin-aarch64-any is unique; getTestAgent emits {queue, os, arch} with no tier; EXPECTED_PLATFORM_RELEASE is gated on tier === "latest" so it's omitted and the runner's platform assert won't reject a mismatched macOS version; getImageKey produces a darwin key that imagePlatforms never contains (darwin is filtered out), so no build-image dep is added. The getTestAgent guard change is backward-compatible — every existing aarch64 darwin entry in testPlatforms has tier set.

Other factors

The author also authored #39191 that this reverses/refines. No outstanding reviewer comments (only bot noise in the timeline). The change is small (~15 lines), mechanical, and the dry-run output demonstrates the intended pipeline shape.

alii added a commit that referenced this pull request Sep 2, 2026
### Problem

The darwin lanes on PR builds skip every test file whose expected
duration is 10s or more (`--skip-slower-than=10000`, from #39215). That
is about 1% of the files but about 60% of a shard's time. A PR can break
one of those tests and still go green. `main` still runs them.

The skip was a stopgap while the mac pool was small.

### Fix

- Remove the skip from the darwin PR lanes and the beta lane.
- Remove the `--skip-slower-than` runner flag. It had no other caller.
- Raise the beta lane's timeout from 45 to 60 minutes. That lane runs
the whole suite as one shard on one box.

`test/expected-durations.json` stays. Shard packing and the parallel
allowlist read it.

### Background

The mac pool is back to full size. On 2026-09-02, over about 19 hours:

- Darwin test jobs waited a median of 6s for an agent (p90 11-17s).
- arm64: about 3 of 15 slots busy on average.
- x64: about 3 of 9 slots busy on average.

A PR darwin shard should go from about 9 minutes to about 14, which is
what the `main` shards take now.

PR builds keep the one "any macOS" lane per arch (#39195). `main` still
runs the three version-specific lanes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants