infra[notask]: fix the SDK e2e models cache key - #4592
Open
Victor-Rodzko wants to merge 1 commit into
Open
Victor-Rodzko wants to merge 1 commit into
Victor-Rodzko wants to merge 1 commit into
Conversation
Contributor
Review StatusCurrent Status: ❌ PENDING Pending reviews: Needs 1 Management or Team Lead, and 1 more from Management, Team Lead, or Member. |
Contributor
License compliance — cleanNo new dependency license findings in this PR. Warn-only (shadow) mode — this check does not block merges yet. Updated automatically by the canonical license compliance workflow. NOTICE presence (advisory)Missing NOTICE (advisory, does not block):
|
Contributor
Workflow security (shadow mode)zizmor found 1124 finding(s) in Findings are annotated inline on the changed files and listed in the job summary. Reproduce locally: pipx run zizmor==1.27.0 --offline .github/ |
Victor-Rodzko
force-pushed
the
infra/sdk-e2e-models-cache-key
branch
from
September 18, 2026 16:25
551b791 to
3313162
Compare
Victor-Rodzko
changed the base branch from
main
to
chore/sdk-0.20.0-changelog
September 18, 2026 16:25
Victor-Rodzko
requested a deployment
to
release
September 18, 2026 16:31 — with
GitHub Actions
In progress
hashFiles() pointed at packages/sdk/models/registry/models.ts, which moved to packages/inference in #3595. hashFiles() on a path that matches nothing returns an empty string, so since June every SDK e2e job has restored from the constant key `qvac-models-`: registry changes never invalidated it, and desktop and electron shared a single entry. bootstrap:desktop pre-downloads 54 model constants; bootstrap:electron pre-downloads 36, a strict subset. Electron finishes bootstrap in ~9s against ~20min for desktop, so it always won the race for the key, and desktop — served a hit — skipped its own save. Desktop then re-downloaded the missing 18 models inside the test step on every run: 22 of the 60 minutes the step is allowed on qvac-win25-x64-gpu in run 35338929076, which is what pushed that job into the timeout. Point hashFiles() at the registry's real location and carry the consumer in the key. The Snap key had the same dead path. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Victor-Rodzko
force-pushed
the
infra/sdk-e2e-models-cache-key
branch
from
September 18, 2026 18:07
3313162 to
5f8e588
Compare
Victor-Rodzko
changed the base branch from
chore/sdk-0.20.0-changelog
to
main
September 18, 2026 18:07
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🎯 What problem does this PR solve?
hashFiles()in the SDK e2e cache steps points atpackages/sdk/models/registry/models.ts. The registry moved topackages/inferencein QVAC-21751 chore[bc]: use @qvac/inference for SDK #3595 and that path no longer exists.hashFiles()on a path that matches nothing returns an empty string, so the key has been the constantqvac-models-since June — visible verbatim in every run log asCache restored from key: qvac-models-.Registry changes therefore never invalidate the models cache.
desktopandelectronshare that single key.bootstrap:desktoppre-downloads 54 model constants;bootstrap:electronpre-downloads 36, a strict subset. The 18 desktop-only ones are the heavy models (FLUX_2_KLEIN_4B_Q4_0,UMT5_XXL_ENC_Q8_0,QWEN3_4B_Q4_K_M, theAUDIOGEN_*set,ABOT_WORLD_*,SD_V2_1_1B_Q8_0,GROOT_*,PI05_BASE_Q_AGGRESSIVE,SMOLVLA_LIBERO_VISION_Q8,REALESRGAN_X4PLUS_ANIME_6B,QWEN3_5_0_8B_MULTIMODAL_Q8_0).Electron finishes bootstrap in ~9s against ~20min for desktop, so it always reserves the key first. Desktop is then served a hit and, because
Save models cacheis gated oncache-hit != 'true', never saves its own set — it re-downloads those 18 models insideRun tests (consumer + producer)on every run and throws them away.In run 35338929076 all six jobs restored the same ~14.87 GB entry:
That bootstrap runs inside a step capped at
timeout-minutes: 60. Onqvac-win25-x64-gpuit consumed 22 of those 60 minutes and the job died onThe action 'Run tests (consumer + producer)' has timed out after 60 minutes.📝 How does it solve it?
hashFiles()at the registry's real location,packages/inference/src/models/registry/models.ts, so the key hashes actual content again.inputs.consumerin the shared key:desktopandelectronkeep separate entries and each saves its own complete set.inputs.consumeronly ever reaches the shared key asdesktoporelectron.Bootstrap (download models)step, which is not under the 60-minute cap, instead of eating the test budget.suite/filterare still absent from the key, so asmokerun can save a narrower set over a full one; andSave models cachestill only runs on a miss, so models a test pulls outside bootstrap (theskipPreDownloaddefsecho,sharded-embeddings,sharded-llm) never land in the cache.🧪 How was it tested?
actionlint .github/workflows/test-node-sdk.yml— clean.Verified
packages/inference/src/models/registry/models.tsexists and holds the constants the bootstrap pulls (LLAMA_3_2_1B_INST_Q4_0,FLUX_2_KLEIN_4B_Q4_0, …);packages/sdk/src/models/registry/index.tsonly re-exports it, so it is not a valid hash target.Desktop-only e2e dispatch off this branch: run 35368887881. The key now carries a real hash, the entry misses, and — for the first time — the save step actually runs:
Step timings, win25 and macos26:
The download now happens in its own step rather than inside the 60-minute test step: the harness's in-test bootstrap found everything already present and finished in 37s against 22min in run 35338929076.
qvac-win25-x64-gpu, which previously died onhas timed out after 60 minutes, is green.That run was dispatched at
3313162cb, before the branch was rebased ontomain..github/workflows/test-node-sdk.ymlandpackages/inference/src/models/registry/models.tsare byte-identical at3313162cband the current head5f8e588f7, so the key hash and the result carry over.The saved entry is scoped to this branch. After merge, the first desktop run on
mainmisses once and repopulates atmainscope, where every branch can read it.