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

Fix watcher path normalisation with Windows and Watchman #1423

Closed
wants to merge 2 commits into from

Conversation

robhogan
Copy link
Contributor

Summary:
Fixes an issue with the Watchman watcher backend on Windows where emitted posix-style paths were not properly normalised, leading to inconsistencies with other watchers and broken tests.

Adds the necessary normalisation and reenables tests.

Changelog: Internal

(This is luckily corrected downstream by the use of path.join on relativePath, which performs normalisation, so there was no observable bug here, it was just fragile.)

Reviewed By: huntie

Differential Revision: D67700720

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Dec 31, 2024
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D67700720

Summary:
Despite increasing timeouts for this test a few times, we still see failures both in OSS and internal CI.

I'm pretty sure there's a race condition in both our own `FallbackWatcher` / `NodeWatcher` *and* Watchman where when recursively watching a subtree, new files are added before a directory is watched or crawled, and so we never see an event for them.

This is a problem, but I don't want to entirely lose the signal for this important set of tests due to that flakiness. This skips the problematic test on Windows and Linux until we have a better fix. We haven't observed a problem on macOS IIRC.

Changelog: Internal

Reviewed By: huntie

Differential Revision: D67712965
Summary:

Fixes an issue with the Watchman watcher backend on Windows where emitted posix-style paths were not properly normalised, leading to inconsistencies with other watchers and broken tests.

Adds the necessary normalisation and reenables tests.

Changelog: Internal

(This is luckily corrected downstream by the use of `path.join` on `relativePath`, which performs normalisation, so there was no observable bug here, it was just fragile.)

Reviewed By: huntie

Differential Revision: D67700720
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D67700720

@facebook-github-bot
Copy link
Contributor

This pull request has been merged in dd3e56c.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. fb-exported Merged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants