Skip to content

ci: select runners by preset instead of a machine spec - #13779

Merged
ChiragAgg5k merged 7 commits into
mainfrom
ci/gcrunner-presets-labels
Sep 21, 2026
Merged

ChiragAgg5k merged 7 commits into
mainfrom
ci/gcrunner-presets-labels

Conversation

@ChiragAgg5k

@ChiragAgg5k ChiragAgg5k commented Sep 20, 2026 •

Copy link
Copy Markdown
Member

Moves every remaining job onto gcrunner and removes the last RunsOn labels, so nothing in this repository depends on RunsOn any more.

What changed

Seven runs-on= labels go — five job labels plus the runner4/runner8 pair built in the E2E matrix script. The GitHub-hosted jobs stay where they are: issue triage, labelling, stale, CodeQL, publish, release and the Tests / Matrix gate every test job waits on, where a VM boot would sit on the critical path of every run.

Labels currently name a machine shape directly:

runs-on: gcrunner=${{ github.run_id }}-checks-${{ strategy.job-index }}/family=c3d/cpu=4+8/ram=16+32/disk=80gb

These were runner=standard and so on, resolving against .github/gcrunner.yml from #13778. They are spelled out again for now because the orchestrator reads that file from the default branch on a public repository, never from the pull request head — so a preset edit on this branch could not be measured on this branch. Once the shape below is agreed, the family moves into gcrunner.yml on main and these go back to runner=<name>.

Runtime against RunsOn

Run 35527182388 against the median of the last 8 successful main runs on RunsOn.

Job RunsOn median gcrunner Δ
Benchmark 5m14s (n=8) 6m21s +21%
Tests / E2E / PostgreSQL (dedicated) / Realtime 4m49s (n=8) 5m35s +16%
Tests / E2E / PostgreSQL (dedicated) / Databases 4m29s (n=8) 4m46s +6%
Tests / E2E / PostgreSQL (dedicated) / Migrations 4m09s (n=8) 4m27s +7%
Tests / E2E / PostgreSQL (dedicated) / Sites 3m48s (n=8) 5m02s +32%
Tests / E2E / PostgreSQL (dedicated) / Functions 3m27s (n=8) 4m30s +30%
Tests / E2E / PostgreSQL (dedicated) / TablesDB 3m21s (n=8) 3m32s +5%
Tests / E2E / PostgreSQL (dedicated) / FunctionsSchedule 3m14s (n=8) 3m50s +18%
Tests / E2E / PostgreSQL (dedicated) / Project 3m13s (n=8) 3m52s +20%
Tests / E2E / PostgreSQL (dedicated) / Projects 2m49s (n=8) 3m17s +16%
Tests / E2E / PostgreSQL (dedicated) / Mqtt 2m49s (n=5) 3m14s +15%
Tests / E2E / PostgreSQL (dedicated) / Messaging 2m16s (n=8) 2m45s +21%
Tests / E2E / PostgreSQL (dedicated) / GraphQL 2m12s (n=8) 2m35s +17%
Tests / E2E / PostgreSQL (dedicated) / ProjectWebhooks 2m11s (n=8) 2m42s +23%
Tests / E2E / PostgreSQL (dedicated) / VCSGitea 2m11s (n=8) 2m59s +37%
Tests / E2E / PostgreSQL (dedicated) / Storage 2m03s (n=8) 2m32s +23%
Tests / E2E / PostgreSQL (dedicated) / Account 2m03s (n=8) 2m37s +28%
Tests / E2E / PostgreSQL (dedicated) / Notifications 2m00s (n=8) 2m26s +21%
Tests / E2E / PostgreSQL (dedicated) / Proxy 1m59s (n=8) 2m26s +23%
Tests / E2E / PostgreSQL (dedicated) / Avatars 1m59s (n=8) 2m32s +28%
Tests / E2E / Abuse (dedicated) 1m49s (n=8) 2m21s +29%
Tests / Unit 1m47s (n=8) 2m16s +27%
Tests / E2E / PostgreSQL (dedicated) / Users 1m46s (n=8) 2m22s +34%
Tests / E2E / Antivirus (dedicated) 1m44s (n=8) 2m02s +17%
Tests / E2E / PostgreSQL (dedicated) / Presences 1m43s (n=8) 2m07s +23%
Tests / E2E / PostgreSQL (dedicated) / Webhooks 1m40s (n=8) 2m09s +29%
Tests / E2E / PostgreSQL (dedicated) / Locale 1m39s (n=8) 2m01s +22%
Tests / E2E / PostgreSQL (dedicated) / Organization 1m39s (n=8) 2m05s +26%
Tests / E2E / PostgreSQL (dedicated) / Usage 1m38s (n=8) 1m56s +18%
Tests / E2E / Screenshots (dedicated) 1m38s (n=8) 2m13s +35%
Tests / E2E / PostgreSQL (dedicated) / Teams 1m38s (n=8) 2m18s +41%
Tests / E2E / PostgreSQL (dedicated) / Tokens 1m37s (n=8) 2m00s +24%
Tests / E2E / General 1m36s (n=8) 2m07s +32%
Tests / E2E / PostgreSQL (dedicated) / Advisor 1m34s (n=8) 1m57s +24%
Tests / E2E / PostgreSQL (dedicated) / VCSGitHub 1m33s (n=8) 1m51s +19%
Tests / E2E / S3 Storage (dedicated) 1m32s (n=8) 2m05s +35%
Tests / E2E / PostgreSQL (dedicated) / Console 1m31s (n=8) 2m05s +37%
Tests / E2E / PostgreSQL (dedicated) / Health 1m26s (n=8) 2m01s +41%
Build 1m05s (n=8) 0m27s -59%

TOTAL 39 jobs: 91m01s -> 110m23s (+21.3%)
slower on gcrunner: 38/39

Read this honestly: it is still slower

Total job time 91m01s → 110m23s, +21%, and 38 of 39 jobs are slower. That is not run-to-run noise — it is every lane in the same direction against an 8-run median.

It was worse. The first attempt used n2d and came out at +42%: n2d-standard-4 is EPYC Rome/Milan, where RunsOn's runner=4cpu-linux-x64/family=c7 was handing out Zen 4 / Sapphire Rapids. Moving to c3d (Genoa) halved the gap, which confirms the core generation was most of it.

The remaining 21% is probably not CPU. Every job is slower by a roughly constant 20–35 seconds regardless of how long it runs — Health 1m26s → 2m01s (+35s) next to Databases 4m29s → 4m46s (+17s) — which is the signature of fixed per-job overhead, not compute. Two candidates:

  • RunsOn's labels carried extras=ecr-cache, a warm image cache in the same account. Here every job pulls from Artifact Registry.
  • RunsOn used volume=60g; these run 80gb pd-ssd.

More vCPU will not close that. The next measurement is per-step timing on one lane to see whether the flat ~25s is the image pull.

For contrast, appwrite-labs/cloud came out 7.5% faster on the same migration — its lanes run 10–35 minutes, long enough that a fixed 25s is noise. This repository's lanes are 1–5 minutes, so the same overhead is 20–30% of the job.

Build is the exception at 1m05s → 0m27s, which is the registry cache working rather than anything about the machine.

Why move at all

No label names an image, so the default resolves the image family. The old labels pinned gcrunner-ubuntu2404-x64-baf37b4-20260917131151 by name, and when the image workflow pruned it on 2026-09-19 — it keeps the newest three per family, and three releases that day evicted it — every gcrunner job in this repository queued indefinitely behind The referenced image resource cannot be found. A family pointer cannot be collected.

Each label names the shape it needs and the shape is defined once, in
.github/gcrunner.yml. No preset names an image, so the default resolves the
image family rather than a build name that the image workflow can prune.

Depends on the presets being on main first: the orchestrator reads that file
from the default branch on a public repository, so these labels resolve only
after #13778 lands.
@greptile-apps

greptile-apps Bot commented Sep 20, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerConfidence Score: 5/5

The PR appears safe to merge; no actionable failures remain, and the previously reported preset-performance mismatch was resolved by moving the preset definitions to c3d.

Summary

This PR completes the CI migration from RunsOn and explicit machine specifications to centralized gcrunner presets.

  • Selects named presets for CI, SDK preview, and specification-generation jobs.
  • Moves build-image publication and caching from RunsOn-provided AWS resources to the gcrunner registry.
  • Updates test jobs to pull the generated image through the gcrunner registry.
  • Preserves GitHub-hosted execution for external pull requests where required.

Reviews (6) · Last reviewed commit: "Merge branch 'main' into ci/gcrunner-pre..."

@github-actions

github-actions Bot commented Sep 20, 2026 •

Copy link
Copy Markdown

✨ Benchmark results

Comparing main (before) → ci/gcrunner-presets-labels (after).

Metric Before After Change
🚀 Requests/sec 201.14 203.48 ⚪ +1.2%
⏱️ Latency P50 87.26 ms 85.81 ms ⚪ -1.7%
⏱️ Latency P95 197.72 ms 198.27 ms ⚪ +0.3%
Per-scenario breakdown & investigation details

Metrics below reflect the current branch (after). Δ P95 compares against the base.

Scenario P50 (ms) P95 (ms) Requests RPS Δ P95 (ms)
API total 85.81 198.27 12,654 203.48 +0.55
Account 160.89 296.83 666 11.1 +0.11
TablesDB 81.92 152.52 6,882 112.07 -10.92
Storage 82.04 178.97 3,330 56.33 +11.5
Functions 124.86 231.61 1,776 30.72 +6.22

Top API waits (after)

API request Max wait (ms)
account.prefs.update 409.22
functions.create 400.28
account.name.update 376.7
storage.files.preview 328.31
functions.variables.update 326.91

The preset run came out 42% slower than RunsOn across 38 of 39 jobs, because
n2d-standard-4 is EPYC Rome/Milan against the Zen 4 machines RunsOn was handing
out for runner=4cpu-linux-x64/family=c7. These lanes are short and largely
single-thread bound, so the core generation shows up directly.

Explicit labels rather than presets, because the orchestrator reads
.github/gcrunner.yml from the default branch on a public repository, so a
preset edit on this branch would not affect this branch is own CI. Measure
first, then move the family into the presets and restore runner=<name>.
Comment thread .github/workflows/ci.yml Resolved
Per-step timing shows the gap is image pulls, not compute: Run tests is 3s on
RunsOn against 5s here, while Pull Docker Image is 12s against 54s and Pull
Docker Compose images 50s against 87s.

The app image already comes from GCRUNNER_REGISTRY_PULL, but jobs spread over
eight regions, so each regional read-through cache is cold for a new SHA and the
image is fetched cross-region once per region. europe-west3 is where the source
registry lives, so pinning there should make every job after the first a local
hit.
The explicit family=c3d labels were only there to measure the family change on
this branch, since the orchestrator reads .github/gcrunner.yml from the default
branch on a public repository. The measurement is done and the family moves into
the presets in #13782, so the labels go back to runner=<name>.
Comment thread .github/workflows/ci.yml Resolved
pull Bot pushed a commit to erickirt/appwrite that referenced this pull request Sep 20, 2026
n2d-standard-4 is EPYC Rome/Milan where RunsOn was handing out Zen 4, and these
lanes are short and largely single-thread bound, so the core generation shows up
directly: 42% slower than RunsOn on n2d against 21% on c3d, measured on appwrite#13779.

Only the family changes, so every existing runner=<name> keeps resolving.
@ChiragAgg5k
ChiragAgg5k merged commit 7c08cb2 into main Sep 21, 2026
54 checks passed
@ChiragAgg5k
ChiragAgg5k deleted the ci/gcrunner-presets-labels branch September 21, 2026 08:30
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.

3 participants