Repository navigation
fix(dms): pass the nightly's Windows legs and its Stress mongod check - #1227
Merged
Merged
Conversation
Upd4ting
marked this pull request as ready for review
November 20, 2026 22:22
Upd4ting
enabled auto-merge
November 20, 2026 22:22
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Wec9b4589-23: makes the Windows legs of the dms nightly pass again (from ANT-3515), and fixes the
ci / Stressfailure of 11-17.Cause
The 11-20 nightly (run 44660722441) failed on four causes. A fifth explains the 11-17 Stress failure.
saveRun.saveRunwritesrun.json.next, then renames it overrun.json. Windows refuses to replace a file another process has open, so the rename fails withEPERMwhile a service reads the run.run-state.test.mjs"a process reading the run while it is saved again never reads a partial run.json" hits it on every run.filethrough ts-morph'sgetFilePath(), which always uses/. Three test files added on 11-19 (perf(dms): keep the parsed declarations of the builder's index across operations #1183, fix(dms): rebuild the builder's projects when the install state or the tsconfig changes #1188, perf(dms): typecheck only the files a builder save can break #1191) built the expected path withpath.join, which uses\on Windows. This failed 19 tests acrossbuilder:1/5,2/5and3/5. The engine is consistent: its other paths also come fromgetFilePath(), andisInsideFoldercompares throughpath.relative, which accepts both separators.suite.test.mjsexpectedrealpathSync(mkdtemp(tmpdir())), which keeps the runner's 8.3 short nameC:\Users\RUNNER~1\…. The kit resolves a config againstgit rev-parse --show-toplevel, which answers the long nameC:\Users\runneradmin\…. Both name one folder, but the test compared the strings, so three suite tests failed./procon Windows.services.test.mjschecks the mail sink's port throughlistenersOf, which answersnullwhere/procis missing. The rest of the test, that a kit copy with nobin/starts and records its mail sink, holds on Windows.stopRecordedstops waiting onceisSameProcessreports a process gone, and it treats an unreaped zombie as gone.mongo-server.test.mjs"a mongod that cannot join the replica set is stopped" then asserted withisAlive, akill(pid, 0)that a zombie still passes until Node reaps it. Under the Stress job's 16 busy loops, the reap comes after the assertion.The dev-frontend
write ECONNRESETfailures in the 11-18 and 11-20 Windows logs are the pooled-connection race that #1197 fixed. #1197 landed at 03:14 UTC on 11-20, after that night's run on 658fcde. The 11-19 Stress failure (invite-validation-failure.test.mjs) failed on every leg that night. It came from the #1158 dependency bumps, which #1161 repaired.Change
saveRunreplacesrun.jsonthroughreplaceFile, which retries the rename on WindowsEPERMevery 5 ms for up to 2 s. Any other error, andEPERMon another platform, throws at once.filethroughpath.normalizebefore comparing it withpath.join.suite.test.mjsbuilds its checkout root withrealpathSync.native, which expands 8.3 names the way git does.services.test.mjschecks the port's listener only wherehasProc()holds. Everywhere it still checks thatensureMailexits 0 and that the run records a mail sink.mongo-server.test.mjsasserts withisRunning, the checkstopRecordedwaits on. It reads a zombie as stopped, and it falls back toisAlivewhere/procis missing.The
.agentsformal checks need no change here.formal.ymlandformal-generated.ymlrun them onubuntu-latestonly, andchecks/run-tests.mjsruns only.agents/formal/maps.test.mjs, which spawns nopnpm.flowchart LR A[saveRun] --> B[write run.json.next] B --> C{rename over run.json} C -->|ok| D[done] C -->|EPERM on Windows, under 2 s| E[wait 5 ms] --> C C -->|other error, or 2 s passed| F[throw]Proof
The Windows failures come from the 11-20 nightly logs. Pull request CI runs no Windows leg, so the next scheduled nightly proves the fix on Windows.
Builder diagnostics. Before, on
windows-latest:The same comparison on Windows path rules, reproduced on Linux with
path.win32:After, on Linux (
ajs module test . -f dist/test/unit/builder/<file>.test.js):run.json rename. Before, on
windows-latest:Suite paths. Before, on
windows-latest:After, the touched kit tests on Linux (
node --test --test-concurrency=4 e2e/run-state.test.mjs e2e/suite.test.mjs e2e/services.test.mjs e2e/mongo-server.test.mjs):Stress mongod. Before, in the 11-17 Stress run:
Reproduced locally beside 16 busy loops. A script that runs the test's steps 30 times and reads
/proc/<pid>/statwheneverisAlivestill answers true:The test itself, 30 runs each beside 16 busy loops:
Follow-ups