Skip to content

test(snapshots): stop Windows network stalls from timing out PTY cases - #2407

Closed
fengmk2 wants to merge 1 commit into
mainfrom
test/deflake-snapshot-network-stalls
Closed

test(snapshots): stop Windows network stalls from timing out PTY cases#2407
fengmk2 wants to merge 1 commit into
mainfrom
test/deflake-snapshot-network-stalls

Conversation

@fengmk2

@fengmk2 fengmk2 commented Aug 11, 2026

Copy link
Copy Markdown
Member

Two PTY snapshot cases intermittently fail the Windows leg with "timed out after 60s" and empty partial output: migration_eslint and command_cache_bun (run 31453833634, attempts 2 and 4 red, attempt 5 green with no code change). This is the stall class from #2390: the Windows runner's connections to external hosts stall intermittently, and any step that must fetch from the network inside its 60s budget dies with no output.

Where each case stalls:

  • migration_eslint has no Node version pin, so the global vp resolves "latest LTS" through a nodejs.org/dist/index.json fetch before it spawns node and prints anything. Each case runs in a fresh VP_HOME and the CI runtime seed carries no index cache, so every unpinned case fetches the index. A stall there spends the whole step budget before the first byte of output.
  • command_cache_bun provisions bun@1.3.11 into its fresh VP_HOME. A stalled tarball download holds the request for vp's full download timeout (10 minutes since feat(cli): make download timeout configurable and more forgiving #2386), so the in-request retry never fires inside the step budget.

Two fixes:

  • Warm the version index cache in the snapshot jobs' prewarm step with vp env list-remote, so node/index_cache.json lands in the seeded js_runtime dir. nodejs.org serves the index with a one-hour max-age, which covers the whole suite, and vp falls back to an existing cache when a later fetch fails.
  • Set VP_DOWNLOAD_TIMEOUT=30 (the feat(cli): make download timeout configurable and more forgiving #2386 knob) in every case's env in the runner, so a stalled runtime or package-manager download fails fast enough for vp's retry (3 attempts) to finish inside the 60s step budget. Healthy CI downloads take about a second.

Verification: cargo check -p vp_cli_snapshots --tests and cargo fmt --check pass; command_cache_bun and dev_engines_runtime_pnpm10 pass through the runner locally with the new env (the installed vp 0.2.8 ignores the unknown variable; CI builds vp from HEAD where the cap is active). migration_eslint needs the JS dist build a fresh worktree lacks, so CI covers it. vp env list-remote was verified to write js_runtime/node/index_cache.json with a ~3600s TTL from the real nodejs.org response.

@netlify

netlify Bot commented Aug 11, 2026

Copy link
Copy Markdown

Deploy Preview for viteplus-preview canceled.

Name Link
🔨 Latest commit cb0e789
🔍 Latest deploy log https://app.netlify.com/projects/viteplus-preview/deploys/6a7ab1ca1c415a00083439d1

@fengmk2
fengmk2 requested a review from wan9chi August 11, 2026 04:59
@fengmk2 fengmk2 self-assigned this Aug 11, 2026
Two snapshot cases intermittently fail the Windows leg with "timed out
after 60s" and empty partial output (run 31453833634, attempts 2 and 4;
same stall class as #2390):

- migration_eslint: the fixture has no Node version pin, so the global
  vp resolves "latest LTS" through a nodejs.org/dist/index.json fetch
  before it spawns node and prints anything. Each case runs in a fresh
  VP_HOME and the CI runtime seed carries no index cache, so every such
  case fetches the index, and a stalled connection spends the whole 60s
  step budget with no output.
- command_cache_bun: the case provisions bun@1.3.11 into its fresh
  VP_HOME, and a stalled tarball download holds the request for vp's
  full download timeout (10 minutes since #2386), so the retry never
  gets a chance inside the step budget.

Two fixes:

- Warm the version index cache in the snapshot jobs' prewarm step with
  `vp env list-remote`, so `node/index_cache.json` lands in the seeded
  js_runtime dir. nodejs.org serves the index with a one-hour max-age,
  which covers the whole suite, and vp falls back to an existing cache
  when a later fetch fails.
- Set VP_DOWNLOAD_TIMEOUT=30 (the #2386 knob) in every case's env in
  the runner, so a stalled runtime or package-manager download fails
  fast enough for vp's retry to finish inside the 60s step budget.
  Healthy CI downloads take about a second.

Verified with `cargo check -p vp_cli_snapshots --tests` plus local runs
of command_cache_bun and dev_engines_runtime_pnpm10 (both pass; the
installed vp 0.2.8 ignores the unknown env var, while CI builds vp from
HEAD where the cap is active). migration_eslint needs the JS dist that
a fresh worktree lacks, so CI covers that case.

Claude-Session: https://claude.ai/code/session_015ALfSFSa1Q2BN198bkDbpr
@fengmk2
fengmk2 force-pushed the test/deflake-snapshot-network-stalls branch from c6b4207 to cb0e789 Compare August 11, 2026 05:23
@fengmk2 fengmk2 closed this Aug 11, 2026
@fengmk2
fengmk2 deleted the test/deflake-snapshot-network-stalls branch August 11, 2026 11:47
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.

1 participant