Repository navigation
ci: run tests on a bun build that has the spawnSync fix - #8311
Conversation
bun 1.4.2 can spin forever in Bun.spawnSync and node:child_process sync spawns when a finalizer from an earlier test file runs during the call. The per-test timeout cannot end it. It hung about 7% of Test jobs. oven-sh/bun#44581 fixes it and is not in a release. The Test job now puts bun 1.4.2-canary.20261007.1 (npm, commit bd599f5af) first on PATH after dependencies are installed with the pinned 1.4.2. Every other job stays on 1.4.2.
|
Note Currently processing new changes in this PR. This may take a few minutes, please wait... ⚙️ Run configuration
📒 Files selected for processing (1)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
🧹 Preview Cleanup CompleteThe following preview resources have been cleaned up:
Thank you for your contribution! 🎉 |
|
1.4.3 contains oven-sh/bun#44581, the synchronous-spawn fix the CI Test job has been taking from a pinned canary since #8311. Tests now run on the same bun as installs, builds and the shipped CLI. Moves .bun-version, packageManager, @types/bun and bun-types, the EAS build profiles and workflows, and the documented minimum. The lockfile change is only the type packages. A fresh install of the same lockfile under 1.4.2 and 1.4.3 gives identical store paths and the same mobile fingerprint, so the runtime version is unchanged.
) 1.4.3 contains oven-sh/bun#44581, the synchronous-spawn fix the CI Test job has been taking from a pinned canary since #8311. Tests now run on the same bun as installs, builds and the shipped CLI. Moves .bun-version, packageManager, @types/bun and bun-types, the EAS build profiles and workflows, and the documented minimum. The lockfile change is only the type packages. A fresh install of the same lockfile under 1.4.2 and 1.4.3 gives identical store paths and the same mobile fingerprint, so the runtime version is unchanged.
About 7% of Test jobs hang. The watchdog from #8305 showed why: a
bun testprocess sits at ~100% CPU with one exited child it never collected. That is bun spinning in a synchronous spawn (Bun.spawnSync,execSync,execFileSync); the per-test timeout cannot end it. oven-sh/bun#44581 fixes it (merged 2026-10-05) and is not in a release yet. 1.4.2 is still the latest.Change
The Test job installs
bun@1.4.2-canary.20261007.1from npm (commitbd599f5af, three commits after the fix) and puts it first onPATH, after dependencies are installed with the pinned 1.4.2. Every other job, and everything we ship, stays on 1.4.2. The npm version is immutable, so the build does not move.Evidence
Measured on #8310 by running the Test job many times per push:
5749c3129, setup-buncanary)bd599f5af, this PR)The canary failures were the known
workspace-fswatcher andi18nprovider flakes and one host-service test. All 9 hangs and the 4 other failures on 1.4.2 were in desktop; the 4 were spawn tests that hit the 5 s timeout, which is the same bug in a milder form.Cost
Tests run on a pre-release bun that differs from the one we ship. Remove the step when
.bun-versionmoves to a release that has the fix. The watchdog from #8305 stays for now so a hang from any other cause still ends at 6 minutes with a dump.Summary by cubic
Fixes the ~7% of Test jobs that hung when bun 1.4.2 spun forever in a synchronous spawn, which the per-test timeout could not end. The Test job now installs
bun@1.4.2-canary.20261007.1(contains the oven-sh/bun#44581 fix) after dependencies are installed with the pinned 1.4.2, and puts it first on PATH. Everything else stays on 1.4.2. Remove this step once.bun-versionmoves to a release with the fix.Written for commit 2b7980b. Summary will update on new commits.
Summary by CodeRabbit