Run Free Tests shards on 16-core runners to cut about a minute (GST-3303) (#4600)

Free Tests now runs its shards on 16-core Ubicloud runners with eight
test workers each, up from 8-core runners with four. In two trial runs
this took about a minute off the slowest shard; the first five pull
request runs after it lands are the real check.

This is part of making pull request CI faster. Splitting the slowest
test file (#4588) is what made the bigger runner pay off; before that
split, the same trial saved only 16–22 s.

Nothing to do. If the first five pull request runs save less than 45 s
on the slowest shard job, this gets reverted.

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
This commit is contained in:
Garry Tanandcapy-ai[bot] authored and GitHub committed 2026-11-21 08:06:12 +00:00
1 parent 6cac5ab34c
commit 09bd0fad0f
4 files changed
+13 -8

No files matched your search

+2 -2
View File
@@ -66,9 +66,9 @@ on:
# before the runner can name a hung file. Measured over 110 free-suite jobs in
# PR runs 41467261350..41478988224: p50 60 s, p90 80 s, max 142 s.
env:
FREE_SUITE_RUNNER: ubicloud-standard-8
FREE_SUITE_RUNNER: ubicloud-standard-16
FREE_SUITE_SHARDS: '10'
FREE_SUITE_JOBS: '4'
FREE_SUITE_JOBS: '8'
FREE_SUITE_SETUP_SECONDS: '300'
# Keyed on the PR number, not head_ref: a bare branch name carries no fork
+1
View File
@@ -0,0 +1 @@
**Free Tests runs its shards on 16-core runners.** Each of the ten free-suite shards and the exclusive one now runs on `ubicloud-standard-16` with eight sub-shards instead of `ubicloud-standard-8` with four, so every sub-shard still gets two vCPUs. In two trial runs the slowest shard job dropped from 222–226 s to 155–158 s, now that no single test file sets the floor. It costs about $0.085 more per run.
+9 -5
View File
@@ -199,11 +199,14 @@ one duration-packed `--ci-plan`, 10 ordinary `--ci-run` shards plus a separate
exclusive-fixture shard, and a `--ci-verify` aggregate. CI shards still run on
independent machines without ordering unrelated jobs. Three workflow-level
constants in `free-tests.yml` set that size for every event: `FREE_SUITE_RUNNER`
(`ubicloud-standard-8`), `FREE_SUITE_SHARDS` (`'10'`) and `FREE_SUITE_JOBS`
(`'4'`, the [sub-shards](#sub-shards-inside-one-ci-job) each shard runs side by
(`ubicloud-standard-16`), `FREE_SUITE_SHARDS` (`'10'`) and `FREE_SUITE_JOBS`
(`'8'`, the [sub-shards](#sub-shards-inside-one-ci-job) each shard runs side by
side), which `free-plan` resolves into the shards' runner, shard count and plan.
GSTA-203 chose them by a 3-run A/B against 20 × `ubicloud-standard-4` at k = 1
(the PR that set them has the table). A `workflow_dispatch` run may
GSTA-203 first chose 10 × `ubicloud-standard-8` at k = 4 by a 3-run A/B against
20 × `ubicloud-standard-4` at k = 1 (the PR that set them has the table). GST-3303
moved to `ubicloud-standard-16` at k = 8 once `test/review-pass.test.ts` was
split: two trial runs cut the slowest shard job from 222–226 s to 155–158 s, for
about $0.085 more per run. A `workflow_dispatch` run may
override them with `free_runner` (`ubicloud-standard-2`, `-4`, `-8` or `-16`),
`free_shards` (1–40) and `free_jobs` (1–8) for runner-sizing experiments only;
its job summary says so, and it is never cited as a PR or train Free Tests result.
@@ -1629,7 +1632,8 @@ refresh to a maintainer.
(`GSTACK_FREE_JOBS=2`, 60-minute job): at four, files that pass nightly failed
under the load and the recording outran its old 30-minute job. The recorder stays on
`ubicloud-standard-8` while the free-suite shards run on `FREE_SUITE_RUNNER`
(`ubicloud-standard-8`); both are Ubicloud standard runners. When either recording adds
(`ubicloud-standard-16` at k = 8, the same two vCPUs per sub-shard); both are
Ubicloud standard runners. When either recording adds
or drops a test file, it force-updates the `bot/free-duration-seeds` branch,
opens or refreshes one seed PR whose body states the ratchet result, and
dispatches Free Tests, Windows Smoke and Quality gate on it. Those
+1 -1
View File
@@ -321,7 +321,7 @@ describe('free-tests workflow wiring', () => {
const workflow = Bun.YAML.parse(source) as any;
const planner = workflow.jobs['free-plan'];
const plan = planner.steps.find((step: any) => step.id === 'plan');
expect(workflow.env.FREE_SUITE_RUNNER).toMatch(/^ubicloud-standard-(2|4|8)$/);
expect(workflow.env.FREE_SUITE_RUNNER).toMatch(/^ubicloud-standard-(2|4|8|16)$/);
expect(workflow.env.FREE_SUITE_SHARDS).toMatch(/^[1-9][0-9]?$/);
expect(planner.outputs.runner).toBe('${{ steps.plan.outputs.runner }}');
expect(workflow.jobs['free-suite']['runs-on']).toBe('${{ needs.free-plan.outputs.runner }}');