From 5f8e588f7303eab9e16c31340a9a56db6a06a4ed Mon Sep 17 00:00:00 2001 From: Victor Rodzko Date: Fri, 18 Sep 2026 19:17:14 +0300 Subject: [PATCH] infra[notask]: fix the SDK e2e models cache key MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- .github/workflows/test-node-sdk.yml | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/.github/workflows/test-node-sdk.yml b/.github/workflows/test-node-sdk.yml index b19f706378..b4dc9594a1 100644 --- a/.github/workflows/test-node-sdk.yml +++ b/.github/workflows/test-node-sdk.yml @@ -414,13 +414,17 @@ jobs: console.log(`SDK cache dir: ${cacheDir}`); console.log(`Config written to: ${configPath}`); + # The key carries the consumer: bootstrap:desktop pre-downloads a strict + # superset of bootstrap:electron, so a shared key let whichever consumer + # bootstrapped first pin the entry to its own set, and the other consumer + # then re-downloaded the difference on every run without ever saving it. - name: Restore models cache id: models-cache if: inputs.consumer != 'snap' && inputs.cache-models != false uses: actions/cache/restore@668228422ae6a00e4ad889ee87cd7109ec5666a7 # 5.0.4 with: path: ${{ inputs.working-directory }}/.qvac-cache - key: qvac-models-${{ hashFiles('packages/sdk/models/registry/models.ts') }} + key: qvac-models-${{ inputs.consumer }}-${{ hashFiles('packages/inference/src/models/registry/models.ts') }} enableCrossOsArchive: true - name: Bootstrap (download models) @@ -435,7 +439,7 @@ jobs: uses: actions/cache/save@668228422ae6a00e4ad889ee87cd7109ec5666a7 # 5.0.4 with: path: ${{ inputs.working-directory }}/.qvac-cache - key: qvac-models-${{ hashFiles('packages/sdk/models/registry/models.ts') }} + key: qvac-models-${{ inputs.consumer }}-${{ hashFiles('packages/inference/src/models/registry/models.ts') }} enableCrossOsArchive: true - name: Build Electron package @@ -564,7 +568,7 @@ jobs: uses: actions/cache/restore@668228422ae6a00e4ad889ee87cd7109ec5666a7 # 5.0.4 with: path: ~/snap/qvac-sdk-e2e/common/.qvac/models - key: qvac-snap-models-${{ hashFiles('packages/sdk/models/registry/models.ts') }} + key: qvac-snap-models-${{ hashFiles('packages/inference/src/models/registry/models.ts') }} - name: Bootstrap models inside Snap if: inputs.consumer == 'snap' && steps.snap-model-requirements.outputs.required == 'true' && steps.snap-models-cache.outputs.cache-hit != 'true' @@ -580,7 +584,7 @@ jobs: uses: actions/cache/save@668228422ae6a00e4ad889ee87cd7109ec5666a7 # 5.0.4 with: path: ~/snap/qvac-sdk-e2e/common/.qvac/models - key: qvac-snap-models-${{ hashFiles('packages/sdk/models/registry/models.ts') }} + key: qvac-snap-models-${{ hashFiles('packages/inference/src/models/registry/models.ts') }} - name: Generate runId if: always()