Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

lib: fix recursive watch on Linux #51049

Closed

Conversation

rubenpad
Copy link

@rubenpad rubenpad commented Dec 4, 2023

Fixes: #48437

Any changes that happen before the watch is set up are lost because the traverse call is asynchronous. I get the tests to pass changing the traverse call by this.#watchFile to watch the folder before any changes and then calling this.#watchFolder to traverse the folder's content and watch it.

Also noticed the timeout calls in the tests. I removed them because I think they're highlighting the issue.

@nodejs-github-bot nodejs-github-bot added fs Issues and PRs related to the fs subsystem / file system. needs-ci PRs that need a full CI run. labels Dec 4, 2023
@rubenpad rubenpad force-pushed the lib-fix-recursive-watch-on-linux branch from 501f1df to 2446ef6 Compare December 4, 2023 23:45
@anonrig anonrig added the request-ci Add this label to start a Jenkins CI on a PR. label Dec 5, 2023
@github-actions github-actions bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Dec 5, 2023
@nodejs-github-bot
Copy link
Collaborator

@nodejs-github-bot
Copy link
Collaborator

@MoLow
Copy link
Member

MoLow commented Dec 5, 2023

there seem te be related test failures:
https://ci.nodejs.org/job/node-test-commit-osx/56003/

parallel.test-fs-watch-recursive-add-file-with-url
parallel.test-fs-watch-recursive-assert-leaks

https://ci.nodejs.org/job/node-test-commit-osx-arm/14863/

parallel.test-fs-watch-recursive-symlink

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fs Issues and PRs related to the fs subsystem / file system. needs-ci PRs that need a full CI run.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Node 20 recursive file watching is misbehaving on Linux
4 participants