Uh oh!
There was an error while loading. Please reload this page.
fs: ignore deleted dirs in recursive watch scan - #63686
Merged
nodejs-github-bot merged 1 commit intoJun 3, 2026
Merged
Conversation
A recursively watched directory can be removed after a parent watcher observes it but before the non-native recursive watcher scans it. Ignore ENOENT from the directory scan so this deletion race does not emit an unhandled watcher error. Signed-off-by: Kamat, Trivikram <16024985+trivikr@users.noreply.github.com> Assisted-by: openai:gpt-5.5
MoLow
reviewed
Jun 1, 2026
Uh oh!
There was an error while loading. Please reload this page.
MoLow
approved these changes
Jun 1, 2026
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@## main #63686 +/- ##
=======================================
Coverage 90.34% 90.35% =======================================
Files 732 732 Lines 236507 236529 +22 Branches 44531 44534 +3 =======================================
+ Hits 213684 213704 +20 - Misses 14525 14540 +15 + Partials 8298 8285 -13
🚀 New features to boost your workflow:
|
nodejs-github-bot
commented
Jun 1, 2026
Collaborator
lpinca
approved these changes
Jun 1, 2026
Uh oh!
There was an error while loading. Please reload this page.
nodejs-github-bot
commented
Jun 3, 2026
Collaborator
Landed in 4d7996f |
aduh95 pushed a commit
that referenced
this pull request
Jun 18, 2026
A recursively watched directory can be removed after a parent watcher observes it but before the non-native recursive watcher scans it. Ignore ENOENT from the directory scan so this deletion race does not emit an unhandled watcher error. Signed-off-by: Kamat, Trivikram <16024985+trivikr@users.noreply.github.com> Assisted-by: openai:gpt-5.5 PR-URL: #63686 Refs: https://github.com/nodejs/reliability/blob/main/reports/2026-06-01.md#jstest-failure Reviewed-By: Moshe Atlow <moshe@atlow.co.il> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
aduh95 pushed a commit
that referenced
this pull request
Jun 25, 2026
A recursively watched directory can be removed after a parent watcher observes it but before the non-native recursive watcher scans it. Ignore ENOENT from the directory scan so this deletion race does not emit an unhandled watcher error. Signed-off-by: Kamat, Trivikram <16024985+trivikr@users.noreply.github.com> Assisted-by: openai:gpt-5.5 PR-URL: #63686 Refs: https://github.com/nodejs/reliability/blob/main/reports/2026-06-01.md#jstest-failure Reviewed-By: Moshe Atlow <moshe@atlow.co.il> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
aduh95 pushed a commit
that referenced
this pull request
Jul 30, 2026
A recursively watched directory can be removed after a parent watcher observes it but before the non-native recursive watcher scans it. Ignore ENOENT from the directory scan so this deletion race does not emit an unhandled watcher error. Signed-off-by: Kamat, Trivikram <16024985+trivikr@users.noreply.github.com> Assisted-by: openai:gpt-5.5 PR-URL: #63686 Refs: https://github.com/nodejs/reliability/blob/main/reports/2026-06-01.md#jstest-failure Reviewed-By: Moshe Atlow <moshe@atlow.co.il> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
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 freeto 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.
Fixes a race in the non-native recursive
fs.watch()implementation.When a directory is removed recursively, the watcher can observe the child
directory from the parent watcher and then attempt to scan it after it has
already been deleted. In that case,
readdirSync()throwsENOENT, which wasemitted as a watcher error and could crash tests with an unhandled
errorevent.
This treats
ENOENTduring the recursive directory scan as a normal deletionrace, while preserving existing error reporting for other failures.
Refs: https://github.com/nodejs/reliability/blob/main/reports/2026-06-01.md#jstest-failure
Example Error log
Assisted-by: openai:gpt-5.5