diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7bbfa1818..1b46d880d 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 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 ae0cb7951..3c94c5587 100644 --- a/scripts/tests/test_ci_scheduling.py +++ b/scripts/tests/test_ci_scheduling.py @@ -39,6 +39,12 @@ def test_required_verdict_includes_every_job(self): 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