Repository navigation
fix(ci): actually exclude Electron probes from the headless node-server lanes - #26093
Conversation
…er lanes vitest 5 does not apply a CLI --exclude to inline projects, so the glibc floor container ran profile-state-writer-stall.electron.test.ts and failed with 'spawn xvfb-run ENOENT'. Resolve the selectors to files and filter them before vitest sees them.
|
Important Review skippedReview was skipped as selected files did not have any reviewable changes. ⚙️ Run configuration
You can disable this status message by setting the Use the checkbox below for a quick retry:
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configuration
📒 Files selected for processing (1)
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 3 remain after this review. 📝 WalkthroughWalkthroughThe test runner now resolves selectors against paths found by Priority: ➖ Normal Merge Risk: ⚪ Minimal · up to The supported Node-server lanes continue to select tests; no actionable merge-blocking risk remains. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
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 |
ELI5
A CI check that runs the server's storage tests inside a bare Linux container kept failing on every PR that touches storage code. One test in that set needs a virtual screen to open an Electron window, and the container has none. The test runner was supposed to skip that test there, but the skip never took effect. Now it does.
What Changed
config/scripts/run-node-server-tests.mjsused to hand vitest folder selectors plus--exclude '**/*.electron.test.ts'. Vitest 5 does not apply a command-line--excludeto projects defined inline in the config (config/vitest.config.tsdefinesnodewithextends: false), so the exclude was silently ignored.profile-state-writer-stall.electron.test.ts(added in #25318) therefore ran in thelinux_glibc_floorcontainer and failed withspawn xvfb-run ENOENT. The same no-op affected the cross-runtime exclusions.The runner now lists the test files itself (same include patterns as the unit suite, same substring matching vitest uses for selectors), drops Electron probes and, outside cross-runtime lanes, the cross-runtime tests, and passes the explicit file list to vitest.
Before/after in CI:
linux_glibc_floorgoes from red to green on any PR that touches persistence code. The Electron probe still runs in the desktop jobs inpr.ymlthat already list it.Why
Making the existing intent work at the place it is declared is the smallest fix. Alternatives considered: making the test skip itself when
xvfb-runis missing (would hide a broken desktop setup as a pass), or adding a new env-driven exclude to the shared vitest config (a new mechanism for one script).Linked Issue
N/A (main-wide CI break, seen on #26088).
Visual Proof
N/A, CI-only change.
Testing
Compared
vitest list --project nodefor the old and new arguments in all three lane shapes (artifact+cross-runtime, artifact only, neither). The only differences are the intended ones: the Electron probe is dropped everywhere, andprofile-state-cross-runtime.integration.test.tsis dropped outside cross-runtime lanes (100→99, 99→97, 93→91 files). The resolved file list equals what vitest then selects.node-server-change-scope,node-server-concurrencyandnode-server-qualificationtests pass.Review
Agent skill upstream boundary
Notes
Windows paths from
globSyncare normalized to forward slashes before matching.Checklist
N/Afor visuals with reason