[PR #7292] [MERGED] ci: skip the onnxruntime CUDA download in test workflows #7668

Closed
opened 2026-10-24 04:06:19 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/7292
Author: @SpicyMarinara
Created: 10/8/2026
Status: ✅ Merged
Merged: 10/8/2026
Merged by: @SpicyMarinara

Base: staging ← Head: chore/ci-skip-onnx-cuda


📝 Commits (2)

  • 5524401 ci: skip the onnxruntime CUDA download in test workflows
  • fecf813 Merge origin/staging into chore/ci-skip-onnx-cuda

📊 Changes

3 files changed (+12 additions, -0 deletions)

View changed files

📝 .github/workflows/playwright.yml (+6 -0)
📝 .github/workflows/pull-request-checks.yml (+5 -0)
📝 CHANGELOG.md (+1 -0)

📄 Description

Warning

Draft until Mari approves: prepared overnight from the nightly e2e triage. Nothing here should be marked ready or merged without her go-ahead.

Important

Contributions target staging. Only SpicyMarinara may promote this repository's staging branch or a same-repository hotfix/* branch to main.
Outside and first-time contributors also require an approving review from SpicyMarinara.

Linked issue

No issue exists for this yet. One should be opened before this PR leaves draft (CONTRIBUTING.md § Before You Open a Pull Request).

Closes #

Why this change

When an ubuntu job starts without a cached pnpm store (Set up Node.js logs pnpm cache is not found), pnpm install runs onnxruntime-node's postinstall, which downloads the linux/x64 CUDA 12 add-on (Microsoft.ML.OnnxRuntime.Gpu.Linux) from api.nuget.org. When NuGet doesn't answer, the postinstall throws ETIMEDOUT, the install fails, and the job never reaches its tests:

  • Nightly Regression Checks run 37563586884 (staging 241ee8f2d, Oct 7): mobile-webkit 4/10 failed in Install dependencies with .../onnxruntime-node postinstall: AggregateError [ETIMEDOUT] ... connect ETIMEDOUT 150.171.109.151:443, so that whole shard never ran.
  • Pull Request Checks run 37561147430 (hotfix/termux-2.5.0-fixes): pnpm-validate failed at Install dependencies with the same ETIMEDOUT.
  • Pull Request Checks run 37620506851 (fix/merged-group-newcomer-recall): pnpm-validate failed right after Downloading https://api.nuget.org/v3-flatcontainer/microsoft.ml.onnxruntime.gpu.linux/1.30.0/...nupkg.

The tests don't need that download. The npm package already ships the CPU binding for linux/x64 (bin/napi-v6/linux/x64/onnxruntime_binding.node + libonnxruntime.so.1). scripts/ensure-native-deps.mjs, scripts/check-workspace-install.mjs and local-embedder.ts only check for that binding. The server never asks for a CUDA execution provider. onnxruntime-node's own script/install.js supports ONNXRUNTIME_NODE_INSTALL=skip: parseInstallFlag() returns false and the script calls process.exit(0) before it reads any manifest or opens a network connection.

What changed

  • .github/workflows/playwright.yml: workflow-level env: ONNXRUNTIME_NODE_INSTALL: skip. The playwright-shard composite action runs its steps with the calling job's env, so every desktop/mobile shard, the browser-smoke job and the complete-node-regressions job get it. The action file itself is unchanged.
  • .github/workflows/pull-request-checks.yml: the same env on the pnpm-validate job only. The Windows job needs no change because win32/x64 has no extra download. container-build-test builds the Dockerfile and is untouched, so it still downloads the add-on and can still hit a NuGet timeout.
  • Release, platform-artifact, prealpha, security-audit and container workflows and the Dockerfile are deliberately unchanged, so shipped installs and images behave exactly as before.
  • CHANGELOG.md: one "For contributors" entry under [Unreleased].

Validation

  • pnpm check passes locally
  • Container (Docker / Podman) built and ran without issue
  • Ran the app, clicked through the changes manually
  • Checked edge cases (light + dark mode, mobile viewport, empty states, error paths)
  • Above manual verification completed (describe below)
  • Read and followed CONTRIBUTING.md

Agent-run results on macOS arm64 / Node 24 / pnpm 10.34.5 (they don't replace the boxes above):

  • ONNXRUNTIME_NODE_INSTALL=skip SHARP_IGNORE_GLOBAL_LIBVIPS=1 pnpm install --frozen-lockfile passed. Root postinstall: [native-deps] onnxruntime-node native binding is ready for darwin/arm64.
  • ONNXRUNTIME_NODE_INSTALL=skip pnpm -r rebuild onnxruntime-node sharp --config.side-effects-cache=false forced the real postinstall (.../onnxruntime-node postinstall$ node ./script/install → Done).
  • node scripts/ensure-native-deps.mjs and node scripts/check-workspace-install.mjs both exited 0 after that install.
  • CI path simulation: ran onnxruntime-node's script/install.js with os.platform()/os.arch() faked to linux/x64 and https stubbed. Without the variable it immediately requests https://api.nuget.org/v3/index.json. With ONNXRUNTIME_NODE_INSTALL=skip it exits 0 with no request.
  • CPU binding: loaded onnxruntime-node from packages/server (the same resolution local-embedder.ts uses) and ran InferenceSession.create(..., { executionProviders: ["cpu"] }) on a tiny Identity model: [1.5, -2] in, [1.5, -2] out.
  • Regressions with the variable set: transformers-runtime, memory-recall-revectorize, semantic-summary-cancellation, semantic-summary-settings, entity-embedding-store, lorebook-vectorization, archive-extraction-security (which covers the patched onnxruntime-node installer) all passed.
  • actionlint 1.7.12 (Docker image) on both workflows: clean, as is the staging baseline. A js-yaml parse confirms env.ONNXRUNTIME_NODE_INSTALL == "skip" at the expected levels. node scripts/validate-pr-triage.mjs passed. pnpm check exited 0, and Prettier is clean on the changed files.
  • Local CodeRabbit (coderabbit review --agent --committed) reported 0 findings.

Manual verification notes

The variable only matters when pnpm actually runs onnxruntime-node's install script, which happens on a cold store. When Set up Node.js logs Cache hit for: node-cache-Linux-x64-pnpm-..., pnpm reuses the build it cached earlier, the script never runs, and the log has no onnxruntime-node postinstall line at all. That is what happened in this PR's first run (Pull Request Checks 37717536443, Regression Checks 37717536404), so those green runs don't prove the skip path yet.

  • Manually verify on a run whose Set up Node.js step logs pnpm cache is not found (for example the full Regression Checks run below, which may not find staging's cache) that Install dependencies shows .../onnxruntime-node postinstall$ node ./script/install followed by postinstall: Done, with no Downloading https://api.nuget.org/... line.
  • Manually verify the same in one shard of a full Regression Checks run on this branch (gh workflow run playwright.yml --ref chore/ci-skip-onnx-cuda), for example mobile-webkit 4/10: Install dependencies passes with no NuGet download, then the shard runs its tests.
  • Manually verify in that run's complete-node-regressions job that pnpm regression still passes. This job also inherits the variable. (It passed 538/538 in run 37717536404, but on a cache hit.)
  • Manually verify in this PR's container-build-test log (Build Docker image) that onnxruntime-node's postinstall still downloads microsoft.ml.onnxruntime.gpu.linux and extracts libonnxruntime_providers_cuda.so, so the Docker image keeps its GPU files. Run 37717536443 shows this; the Docker build doesn't receive the job's env. No other release workflow ships a Linux node_modules: the GitHub Release is a git archive of the tag.

Docs and release impact

  • No docs changes needed
  • Updated docs (README / CONTRIBUTING / android/README / CHANGELOG) as needed
  • Translated docs on the docs-i18n branch updated to match, or a [docs-i18n] follow-up issue opened (see CONTRIBUTING.md § Translated documentation)
  • Version/release files updated (only if this PR includes a version bump)

CI-only. The only docs change is a CHANGELOG entry, and nothing under docs/ changes.

UI evidence (if applicable)

Not applicable (CI configuration only).

Summary by CodeRabbit

  • Chores
    • Automated browser tests and pull request checks now skip downloading an optional GPU component during installation.
    • Local embedding continues to use the CPU build.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/Pasta-Devs/Marinara-Engine/pull/7292 **Author:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Created:** 10/8/2026 **Status:** ✅ Merged **Merged:** 10/8/2026 **Merged by:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Base:** `staging` ← **Head:** `chore/ci-skip-onnx-cuda` --- ### 📝 Commits (2) - [`5524401`](https://github.com/Pasta-Devs/Marinara-Engine/commit/55244014945f28977e0add4e4f3ab2fb119d62e4) ci: skip the onnxruntime CUDA download in test workflows - [`fecf813`](https://github.com/Pasta-Devs/Marinara-Engine/commit/fecf8133c2e59a2ad503efb950ee31f580fe5041) Merge origin/staging into chore/ci-skip-onnx-cuda ### 📊 Changes **3 files changed** (+12 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `.github/workflows/playwright.yml` (+6 -0) 📝 `.github/workflows/pull-request-checks.yml` (+5 -0) 📝 `CHANGELOG.md` (+1 -0) </details> ### 📄 Description > [!WARNING] > **Draft until Mari approves: prepared overnight from the nightly e2e triage.** Nothing here should be marked ready or merged without her go-ahead. > [!IMPORTANT] > Contributions target `staging`. Only `SpicyMarinara` may promote this repository's `staging` branch or a same-repository `hotfix/*` branch to `main`. > Outside and first-time contributors also require an approving review from `SpicyMarinara`. <!-- See CONTRIBUTING.md § Branches. --> ## Linked issue No issue exists for this yet. One should be opened before this PR leaves draft (CONTRIBUTING.md § Before You Open a Pull Request). Closes # ## Why this change When an ubuntu job starts without a cached pnpm store (`Set up Node.js` logs `pnpm cache is not found`), `pnpm install` runs onnxruntime-node's postinstall, which downloads the linux/x64 **CUDA 12** add-on (`Microsoft.ML.OnnxRuntime.Gpu.Linux`) from `api.nuget.org`. When NuGet doesn't answer, the postinstall throws `ETIMEDOUT`, the install fails, and the job never reaches its tests: - Nightly Regression Checks [run 37563586884](https://github.com/Pasta-Devs/Marinara-Engine/actions/runs/37563586884) (staging `241ee8f2d`, Oct 7): **mobile-webkit 4/10** failed in *Install dependencies* with `.../onnxruntime-node postinstall: AggregateError [ETIMEDOUT] ... connect ETIMEDOUT 150.171.109.151:443`, so that whole shard never ran. - Pull Request Checks [run 37561147430](https://github.com/Pasta-Devs/Marinara-Engine/actions/runs/37561147430) (`hotfix/termux-2.5.0-fixes`): **pnpm-validate** failed at *Install dependencies* with the same `ETIMEDOUT`. - Pull Request Checks [run 37620506851](https://github.com/Pasta-Devs/Marinara-Engine/actions/runs/37620506851) (`fix/merged-group-newcomer-recall`): **pnpm-validate** failed right after `Downloading https://api.nuget.org/v3-flatcontainer/microsoft.ml.onnxruntime.gpu.linux/1.30.0/...nupkg`. The tests don't need that download. The npm package already ships the CPU binding for linux/x64 (`bin/napi-v6/linux/x64/onnxruntime_binding.node` + `libonnxruntime.so.1`). `scripts/ensure-native-deps.mjs`, `scripts/check-workspace-install.mjs` and `local-embedder.ts` only check for that binding. The server never asks for a CUDA execution provider. onnxruntime-node's own `script/install.js` supports `ONNXRUNTIME_NODE_INSTALL=skip`: `parseInstallFlag()` returns `false` and the script calls `process.exit(0)` before it reads any manifest or opens a network connection. ## What changed - `.github/workflows/playwright.yml`: workflow-level `env: ONNXRUNTIME_NODE_INSTALL: skip`. The `playwright-shard` composite action runs its steps with the calling job's env, so every desktop/mobile shard, the browser-smoke job and the `complete-node-regressions` job get it. The action file itself is unchanged. - `.github/workflows/pull-request-checks.yml`: the same env on the `pnpm-validate` job only. The Windows job needs no change because win32/x64 has no extra download. `container-build-test` builds the Dockerfile and is untouched, so it still downloads the add-on and can still hit a NuGet timeout. - Release, platform-artifact, prealpha, security-audit and container workflows and the `Dockerfile` are deliberately unchanged, so shipped installs and images behave exactly as before. - `CHANGELOG.md`: one "For contributors" entry under `[Unreleased]`. ## Validation - [ ] `pnpm check` passes locally - [ ] Container (Docker / Podman) built and ran without issue - [ ] Ran the app, clicked through the changes manually - [ ] Checked edge cases (light + dark mode, mobile viewport, empty states, error paths) - [ ] Above manual verification completed (describe below) - [ ] Read and followed `CONTRIBUTING.md` Agent-run results on macOS arm64 / Node 24 / pnpm 10.34.5 (they don't replace the boxes above): - `ONNXRUNTIME_NODE_INSTALL=skip SHARP_IGNORE_GLOBAL_LIBVIPS=1 pnpm install --frozen-lockfile` passed. Root postinstall: `[native-deps] onnxruntime-node native binding is ready for darwin/arm64.` - `ONNXRUNTIME_NODE_INSTALL=skip pnpm -r rebuild onnxruntime-node sharp --config.side-effects-cache=false` forced the real postinstall (`.../onnxruntime-node postinstall$ node ./script/install` → `Done`). - `node scripts/ensure-native-deps.mjs` and `node scripts/check-workspace-install.mjs` both exited 0 after that install. - CI path simulation: ran onnxruntime-node's `script/install.js` with `os.platform()/os.arch()` faked to `linux/x64` and `https` stubbed. Without the variable it immediately requests `https://api.nuget.org/v3/index.json`. With `ONNXRUNTIME_NODE_INSTALL=skip` it exits 0 with no request. - CPU binding: loaded `onnxruntime-node` from `packages/server` (the same resolution `local-embedder.ts` uses) and ran `InferenceSession.create(..., { executionProviders: ["cpu"] })` on a tiny Identity model: `[1.5, -2]` in, `[1.5, -2]` out. - Regressions with the variable set: `transformers-runtime`, `memory-recall-revectorize`, `semantic-summary-cancellation`, `semantic-summary-settings`, `entity-embedding-store`, `lorebook-vectorization`, `archive-extraction-security` (which covers the patched onnxruntime-node installer) all passed. - `actionlint` 1.7.12 (Docker image) on both workflows: clean, as is the staging baseline. A js-yaml parse confirms `env.ONNXRUNTIME_NODE_INSTALL == "skip"` at the expected levels. `node scripts/validate-pr-triage.mjs` passed. `pnpm check` exited 0, and Prettier is clean on the changed files. - Local CodeRabbit (`coderabbit review --agent --committed`) reported 0 findings. ### Manual verification notes The variable only matters when pnpm actually runs onnxruntime-node's install script, which happens on a cold store. When *Set up Node.js* logs `Cache hit for: node-cache-Linux-x64-pnpm-...`, pnpm reuses the build it cached earlier, the script never runs, and the log has no `onnxruntime-node postinstall` line at all. That is what happened in this PR's first run ([Pull Request Checks 37717536443](https://github.com/Pasta-Devs/Marinara-Engine/actions/runs/37717536443), [Regression Checks 37717536404](https://github.com/Pasta-Devs/Marinara-Engine/actions/runs/37717536404)), so those green runs don't prove the skip path yet. - Manually verify on a run whose *Set up Node.js* step logs `pnpm cache is not found` (for example the full Regression Checks run below, which may not find staging's cache) that *Install dependencies* shows `.../onnxruntime-node postinstall$ node ./script/install` followed by `postinstall: Done`, with no `Downloading https://api.nuget.org/...` line. - Manually verify the same in one shard of a full Regression Checks run on this branch (`gh workflow run playwright.yml --ref chore/ci-skip-onnx-cuda`), for example **mobile-webkit 4/10**: *Install dependencies* passes with no NuGet download, then the shard runs its tests. - Manually verify in that run's **complete-node-regressions** job that `pnpm regression` still passes. This job also inherits the variable. (It passed 538/538 in run 37717536404, but on a cache hit.) - Manually verify in this PR's **container-build-test** log (*Build Docker image*) that onnxruntime-node's postinstall still downloads `microsoft.ml.onnxruntime.gpu.linux` and extracts `libonnxruntime_providers_cuda.so`, so the Docker image keeps its GPU files. Run 37717536443 shows this; the Docker build doesn't receive the job's env. No other release workflow ships a Linux `node_modules`: the GitHub Release is a `git archive` of the tag. ## Docs and release impact - [ ] No docs changes needed - [ ] Updated docs (README / CONTRIBUTING / android/README / CHANGELOG) as needed - [ ] Translated docs on the `docs-i18n` branch updated to match, or a `[docs-i18n]` follow-up issue opened (see CONTRIBUTING.md § Translated documentation) - [ ] Version/release files updated (only if this PR includes a version bump) CI-only. The only docs change is a CHANGELOG entry, and nothing under `docs/` changes. ## UI evidence (if applicable) Not applicable (CI configuration only). <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Chores** * Automated browser tests and pull request checks now skip downloading an optional GPU component during installation. * Local embedding continues to use the CPU build. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-24 04:06:19 +07:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Pasta-Devs/Marinara-Engine#7668
No description provided.