From e631e1896f41827631adc0af8f074bef2c8f30f7 Mon Sep 17 00:00:00 2001 From: Claude Date: Tue, 27 Oct 2026 20:31:13 +0000 Subject: [PATCH 1/2] Run ci-ok on a GitHub-hosted runner ci-ok is one 2 s python3 check that runs alone after every other job, so any Depot host boot lands on the merge's critical path: 32 s mean, up to 155 s, in the 10-27 sample (#1745). Hosted ubuntu-24.04 jobs in this repo started in 2-3 s at p90 over 10-24..10-27 (n=27). The job's name, needs, if: always() and logic are unchanged, so the required check stays the same. A scheduling test pins the runner. Fixes #1745 Co-Authored-By: Claude Opus 5.5 (1M context) Claude-Session: https://claude.ai/code/session_011f9aePipa5qoK8iqhBVEbW --- .github/workflows/ci.yml | 6 +++++- scripts/tests/test_ci_scheduling.py | 2 ++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7bbfa1818..342bd6ab8 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -2881,7 +2881,11 @@ jobs: name: ci-ok # registered as a required check; do not rename if: always() needs: [clippy, node-addon, lint-ecosystems, release-readiness, test, test-release, coverage, docker-base, coverage-docker, coverage-merge, dispatch-tests, e2e-build, windows-compile-check, e2e-build-windows, e2e-build-macos, e2e, e2e-windows, e2e-extended, e2e-full, e2e-docker, yarn-classic-matrix, yarn-berry-e2e, yarn-berry-full, cargo-vex-matrix, cargo-vex-matrix-windows, cargo-vex-matrix-full, cargo-old-toolchains, hosted-e2e, e2e-macos, yarn-berry-e2e-macos, cargo-vex-matrix-macos] - runs-on: ${{ vars.DISABLE_DEPOT_RUNNERS == 'true' && 'ubuntu-latest' || 'depot-ubuntu-24.04-4' }} + # GitHub-hosted, not Depot: the check is one 2 s python3 call, and it + # runs alone at the end of every run, so a Depot host boot (up to 2.6 min + # on 10-27) always lands on the merge's critical path. Hosted Linux + # started in 2-3 s at p90 over 10-24..10-27 (#1745). + runs-on: ubuntu-24.04 timeout-minutes: 5 steps: - name: Check every needed job diff --git a/scripts/tests/test_ci_scheduling.py b/scripts/tests/test_ci_scheduling.py index ae0cb7951..00c864feb 100644 --- a/scripts/tests/test_ci_scheduling.py +++ b/scripts/tests/test_ci_scheduling.py @@ -36,6 +36,8 @@ def test_required_verdict_includes_every_job(self): self.assertEqual(dependencies("ci-ok"), set(JOBS) - {"ci-ok"}) self.assertIn(" if: always()", JOBS["ci-ok"]) self.assertIn('if v["result"] not in ("success", "skipped")', "\n".join(JOBS["ci-ok"])) + # No Depot boot on the critical path for a 2 s check (#1745). + self.assertIn(" runs-on: ubuntu-24.04", JOBS["ci-ok"]) for job in JOBS: ancestors(job) # All dependencies exist and the graph is acyclic. From 800ff092d0e1032882978298ac37c664bf2c8768 Mon Sep 17 00:00:00 2001 From: Claude Date: Tue, 27 Oct 2026 22:14:04 +0000 Subject: [PATCH 2/2] Keep a repo-variable switch for the ci-ok runner Code review on #1747: with a hard-coded hosted label, a hosted Linux backlog could only be undone by a PR that itself waits on ci-ok in the backed-up pool. vars.CI_OK_RUNNER restores a no-merge escape hatch, like DISABLE_DEPOT_RUNNERS for the other jobs. Use ubuntu-latest to match every other hosted Linux job, move the assertion into its own test, and drop dated measurements from the YAML comment. Co-Authored-By: Claude Claude-Session: https://claude.ai/code/session_011f9aeP2GXjchXdv7YRSbGe --- .github/workflows/ci.yml | 10 +++++----- scripts/tests/test_ci_scheduling.py | 8 ++++++-- 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 342bd6ab8..1b46d880d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -2881,11 +2881,11 @@ jobs: name: ci-ok # registered as a required check; do not rename if: always() needs: [clippy, node-addon, lint-ecosystems, release-readiness, test, test-release, coverage, docker-base, coverage-docker, coverage-merge, dispatch-tests, e2e-build, windows-compile-check, e2e-build-windows, e2e-build-macos, e2e, e2e-windows, e2e-extended, e2e-full, e2e-docker, yarn-classic-matrix, yarn-berry-e2e, yarn-berry-full, cargo-vex-matrix, cargo-vex-matrix-windows, cargo-vex-matrix-full, cargo-old-toolchains, hosted-e2e, e2e-macos, yarn-berry-e2e-macos, cargo-vex-matrix-macos] - # GitHub-hosted, not Depot: the check is one 2 s python3 call, and it - # runs alone at the end of every run, so a Depot host boot (up to 2.6 min - # on 10-27) always lands on the merge's critical path. Hosted Linux - # started in 2-3 s at p90 over 10-24..10-27 (#1745). - runs-on: ubuntu-24.04 + # GitHub-hosted, not Depot: the check is one 2 s python3 call that runs + # alone at the end of every run, so a Depot host boot always lands on the + # merge's critical path (#1745). If hosted Linux backs up, set the repo + # variable CI_OK_RUNNER (e.g. depot-ubuntu-24.04-4); no merge needed. + runs-on: ${{ vars.CI_OK_RUNNER || 'ubuntu-latest' }} timeout-minutes: 5 steps: - name: Check every needed job diff --git a/scripts/tests/test_ci_scheduling.py b/scripts/tests/test_ci_scheduling.py index 00c864feb..3c94c5587 100644 --- a/scripts/tests/test_ci_scheduling.py +++ b/scripts/tests/test_ci_scheduling.py @@ -36,11 +36,15 @@ def test_required_verdict_includes_every_job(self): self.assertEqual(dependencies("ci-ok"), set(JOBS) - {"ci-ok"}) self.assertIn(" if: always()", JOBS["ci-ok"]) self.assertIn('if v["result"] not in ("success", "skipped")', "\n".join(JOBS["ci-ok"])) - # No Depot boot on the critical path for a 2 s check (#1745). - self.assertIn(" runs-on: ubuntu-24.04", JOBS["ci-ok"]) for job in JOBS: ancestors(job) # All dependencies exist and the graph is acyclic. + def test_ci_ok_defaults_to_a_hosted_runner(self): + # A 2 s check that runs last must not pay a Depot host boot on the + # merge's critical path (#1745); the repo variable is the escape hatch. + runs_on = [line for line in JOBS["ci-ok"] if line.startswith(" runs-on:")] + self.assertEqual(runs_on, [" runs-on: ${{ vars.CI_OK_RUNNER || 'ubuntu-latest' }}"]) + def test_expensive_jobs_cannot_start_after_a_failed_preflight(self): cheap = {"clippy", "lint-ecosystems", "release-readiness", "dispatch-tests", "ci-ok"} # windows-compile-check is the lean queue's only Windows job and sits