Skip to content

CI: run the macOS tests only on main and in the nightly, not on pull requests, which wait for the organization's scarce macOS runners #2298

Backlog

Description

@lagergren

#2291 split the macOS test job in two, "part 1 of 2" and "part 2 of 2", each with half of the test classes (-PtestShard). GitHub's macOS runner (3 CPUs, 7 GB) holds only one test JVM, so one macOS job took about 18–20 minutes while the Linux and Windows jobs, with 3 test JVMs, took 6–8. Two halves took about 10 minutes each, when both got a runner at once.

The problem: each push now needs two macOS runners, and they can be scarce

macOS runners for public repositories come from a small pool, probably shared across the organization. Each push of a pull request now needs two of them.

Measured on the 35 macOS jobs of the last 40 runs of Java CI, all of 2026-11-26, as the time from a job's creation to its first step:

With one runner free at a time, the two halves ran one after the other, each waiting first, which is slower than the single 18–20 minute job.

Proposal

Run the macOS tests in one job again: one test JVM, about 18–20 minutes, needing one runner. Keep the 3 test JVMs on Linux and Windows, and keep -PtestShard, which costs nothing when it isn't used.

Before #2291 #2291 Proposed
macOS runners per push 1 2 1
macOS test time with runners free 18–20 min about 10 min 18–20 min
With one macOS runner free at a time 18–20 min plus a wait two waits, two jobs in a row 18–20 min plus a wait
Linux and Windows 10–13 min 6–8 min 6–8 min

Alternatives considered

  • macOS only on main and in the nightly, not on pull requests. Pull requests would finish in about 8 minutes, but a macOS-only failure would show up on main, after the merge.
  • Keep the split, and measure a week of waits. It's the faster option if long waits are rare. Tonight showed what they cost when they aren't.

Part of #2269.

Activity

  1. added this to the 0.30.3 milestone on Nov 26, 2026
  2. lagergren commented on Nov 26, 2026

    @lagergren
    CollaboratorAuthor

    Decision for 0.30.3, first thing after the 0.30.2 release: run macOS only on main and in the nightly, not on pull requests.

    On 2026-11-26 the macOS jobs waited 16 to over 40 minutes for a runner in the evening, while Linux and Windows started at once. GitHub reported no incident, and macos-26-arm64 has been GA since February. So it's most likely the macOS concurrency limit that the whole organization shares. A split job (two runners per push) or a single one (one runner) still makes every pull request wait for that pool.

    • Pull requests: Linux and Windows only, about 8–10 minutes.
    • Pushes to main and the nightly: they keep the macOS tests, as one job with one test JVM, needing one runner.
    • A macOS failure on main is fixed before anything else, like a known flake.

    @angelozerr: do you know which GitHub plan redhat-developer is on, and whether other repositories use most of its macOS slots? If larger macOS runners are an option for the organization, they would let pull requests keep macOS at full speed.

  3. changed the title [-]CI: run the macOS tests in one job again, since two jobs need two of the scarce macOS runners for each push[/-] [+]CI: run the macOS tests only on main and in the nightly, not on pull requests, which wait for the organization's scarce macOS runners[/+] on Nov 26, 2026
  4. lagergren commented on Nov 27, 2026

    @lagergren
    CollaboratorAuthor

    Measured on 2026-11-27, and two more changes for this issue.

    The waits. From 2026-11-21 to the afternoon of 11-26, ~375 macOS jobs all started within 1.2 minutes. Since about 16:00 CET on 11-26, every macOS job waits for a runner of the organization's pool: 13 to 105 minutes, single jobs as long as the halves of #2291. So the cause is the pool, not our jobs, but our jobs make it worse:

    So this issue is now: macOS only on main and in the nightly, not on pull requests; and on main, none for a push of docs only.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions