Skip to content

ci: run the nightly macOS suite as two shards so each finishes inside its time limit - #5678

Closed
leaf-agent wants to merge 1 commit into
mainfrom
fix/issue-5656
Closed

leaf-agent wants to merge 1 commit into
mainfrom
fix/issue-5656

Conversation

@leaf-agent

Copy link
Copy Markdown
Collaborator

The nightly test-macos job ran every tier on one runner in four to five hours. On 2026-11-05 and 2026-11-06 it hit the Python step's 300-minute timeout-minutes, which kills pytest before it writes results.xml or prints --durations. The suite didn't hang: both job logs show tests passing seconds before the kill (last result at 15:53:58 and 15:53:59, limit at 15:54). This PR splits the job into a two-entry matrix, tests/browser and tests --ignore=tests/browser, each on its own runner with the same two workers, step limit and --run-nightly selection. Each shard uploads its own artifact, pytest-results-test-macos-<shard>-<run>-<attempt>.

Expected effect. Per 2026-11-07's macOS junit (run 42365682113, which finished in 4:28 and did write junit), browser took 4.55 worker-hours and the other tiers 4.55 (journeys 4.29, the rest 0.26). So each shard should take about 2.3 hours, far from the 5-hour limit. Collection by path adds up to the full nightly selection: 3700 + 3098 = 6798 tests, the same count as pytest tests --run-nightly --collect-only. The repository is public, so the second macOS runner costs wall-clock concurrency, not paid minutes.

Verification. The workflow passes the pre-commit actionlint hook. Nothing here can run macOS, so the first scheduled run after merge is the real check: two test-macos (…) jobs that each finish and each upload a results.xml. If that run still times out, its report brings this back to triage.

Needs @max-sixty's approval. This edits .github/workflows/ci.yaml, which is in the control plane, so it waits for the control-plane owner rather than landing on review alone.

Where the time goes
  • Failures are a large share. On 2026-11-07, 84 failed tests used 1.72 of the 9.1 worker-hours, about 50 minutes of wall time on two workers. Most were Playwright expectations waiting out their 120 s timeout. The Nov 5 run already had 127 failures at 64%, and its whole progress curve ran behind the other nights, so the job's length tracks how red the macOS suite is as well as how big it is.
  • The 60–70% span (mostly tests/journeys/test_render_gate.py and the other render journeys) takes 1.4–1.5 hours on every night. The slowest single call was test_page_fixture_opens_without_firefox_console_warnings[feature-gallery] at 990 s.
  • One alternative is to stop pytest with SIGINT before the step limit so it still writes its junit, as the Linux test job already does with timeout --signal=INT … 5h. That keeps the results of a run that overruns but doesn't give back the headroom. Sharding makes an overrun unlikely unless something actually hangs, and faulthandler_timeout already covers a hung test call.

Closes #5656 — automated triage

… step limit

The nightly macOS suite ran on one runner in four to five hours and hit the
Python step's 300-minute limit on 2026-11-05 and 2026-11-06, which kills
pytest before it writes results.xml or prints --durations. Both logs show
tests still passing seconds before the kill, so the suite outgrew the limit;
it did not hang. The job now runs as a matrix: tests/browser, and every other
tier. On 2026-11-07's junit each took about 4.5 worker-hours, so each shard
should take about 2.3 hours on its two workers. Each shard uploads its own
artifact, named with the shard.

Closes #5656
@max-sixty

Copy link
Copy Markdown
Owner

Closing unmerged: test-macos stays on one runner. #5656 has the measurements, and what we'll do if the suite outgrows the limit.

This was written by Claude Code on behalf of max-sixty

@max-sixty max-sixty closed this Nov 16, 2026
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.

test-macos: the Python tests step hits its 300-minute limit and uploads no junit results

2 participants