{{ message }}
test: avoid truncating watched worker deps#63083
Closed
inoway46 wants to merge 1 commit into
Closed
Conversation
b27b615 to
da136db
Compare
Signed-off-by: inoway46 <inoueyuya416@gmail.com>
da136db to
cfcd3e7
Compare
MoLow
approved these changes
May 3, 2026
Contributor
|
LGTM |
Contributor
Author
|
A newer reliability failure shows a different failure log for the same test: This is consistent with the same truncate-window race: the watched worker entry file can be observed while temporarily truncated, so the restarted worker exits without printing worker running. |
Contributor
Author
|
Could someone please request CI? |
Contributor
Author
|
@MoLow |
Collaborator
Member
|
I'd independently worked on an alternative which uses |
Contributor
Author
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.

This fixes a flaky
sequential/test-watch-mode-workerfailure where the nested CJS worker dependency case can log{}instead ofsub-dep v1.The test rewrites watched worker dependency files to trigger
--watchrestarts, but defaultwriteFileSync()temporarily truncates the file. A restarted worker can read the dependency during that empty-file window.This change keeps the write-based restart trigger, but uses
r+to overwrite without truncation.Reported in: https://github.com/nodejs/reliability/blob/main/reports/2026-05-02.md
Testing:
Refs: #62368