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

Support mounted remote file systems #212793

Open
SheepOfNoise opened this issue May 15, 2024 · 14 comments
Open

Support mounted remote file systems #212793

SheepOfNoise opened this issue May 15, 2024 · 14 comments
Labels
feature-request Request for new features or functionality file-watcher File watcher
Milestone

Comments

@SheepOfNoise
Copy link

Does this issue occur when all extensions are disabled?: Yes/No
Yes

Version: 1.90.0-insider
Commit: bbc4ba1
Date: 2024-05-14T05:47:50.971Z
Electron: 29.3.1
ElectronBuildId: 9464424
Chromium: 122.0.6261.156
Node.js: 20.9.0
V8: 12.2.281.27-electron.0
OS: Linux x64 4.18.0-425.3.1.el8.x86_64

Steps to Reproduce:

  1. Open a folder on a mounted remote file system.
  2. External to VS Code (e.g. from a terminal window) modify a file in that folder - e.g. touch a new file.
  3. Expected: the Explorer panel should be automatically updated with the newly created file. For the Source Control panel - it should reflect the file change as well.
  4. Actual: no change is reported on either panels, unless I manually refresh them.

Additional information:

I see these errors in the Window output log:
024-05-15 12:06:26.286 [error] [File Watcher (parcel)] Unexpected error: Invalid argument (EUNKNOWN) (path: /mnt/central/users/ylevy/workspace/ng-rdma)
2024-05-15 12:06:26.288 [error] [File Watcher (universal)] restarting watcher after error: Invalid argument
2024-05-15 12:06:26.451 [error] [File Watcher (parcel)] Unexpected error: Invalid argument (EUNKNOWN) (path: /mnt/central/users/ylevy/workspace/ng-rdma)

This problem does NOT happen when I open a folder on the local filesystem.
This problem does NOT happen when I connect to the machine from a different machine in the same compute cluster (i.e. using the remote VS Code server causes file watch events to be reported as expected).

I tried also with all extensions disabled - same behavior.

@bpasero bpasero added the file-watcher File watcher label May 15, 2024
@bpasero bpasero changed the title File watcher events not generated Support mounted remote file systems May 15, 2024
@bpasero
Copy link
Member

bpasero commented May 15, 2024

It is likely that the file watcher we leverage (https://github.com/parcel-bundler/watcher) does not support remote file systems, but I have not drilled in further. For example, they do support watchman as backend, which we currently do not expose and its possible this would enable such scenarios.

File events were never really supported for network drives, across all OS. In those cases we recommend using our remote extensions (such as SSH) where file events will work.

Treating as feature request.

@bpasero bpasero added the feature-request Request for new features or functionality label May 15, 2024
@bpasero bpasero removed their assignment May 15, 2024
@bpasero bpasero added this to the Backlog milestone May 15, 2024
@SheepOfNoise
Copy link
Author

SheepOfNoise commented May 15, 2024 via email

@bpasero
Copy link
Member

bpasero commented May 15, 2024

Yeah, when connected via remote extension the file watcher runs inside the remote and sends events back to the client. In that case, file events will work. But in the local case, the file watcher relies on the OS reporting events from mounted network drives which is unsupported as far as I know even by the OS.

It is much more preferred to use remote extension, everything will work a lot better, including extensions.

@SheepOfNoise
Copy link
Author

SheepOfNoise commented May 15, 2024 via email

@bpasero
Copy link
Member

bpasero commented May 15, 2024

Depends on what OS is involved in this setup? Is it all Linux everywhere?

@SheepOfNoise
Copy link
Author

Depends on what OS is involved in this setup? Is it all Linux everywhere?

Yes, both machines run Rocky Linux 8.7.

@bpasero
Copy link
Member

bpasero commented May 15, 2024

I cannot really explain that, maybe additional logs would give more hints. If you run code --verbose more logs are created that give info about file watching internals.

Local
In this case, no remote extension is involved. You should find a "Window" output channel in the output panel that you can search for entries that contain File Watcher and attach here.

Remote
In this case, you go via remote extension and you should find a "Server" output channel.

@SheepOfNoise
Copy link
Author

SheepOfNoise commented May 16, 2024 via email

@bpasero
Copy link
Member

bpasero commented May 16, 2024

Unfortunately this misses the verbose output from the server.

Curious how is /mnt/central/users/ylevy/workspace/ng-rdma mounted to your machine? Maybe I could try to reproduce this on my VM.

@SheepOfNoise
Copy link
Author

SheepOfNoise commented May 16, 2024 via email

@bpasero
Copy link
Member

bpasero commented May 16, 2024

Yeah really strange, I cannot explain. The only difference in the local vs remote case is how the watcher is natively compiled (for Electron, for node.js), but I would be surprised if that really makes any difference.

Again, how is this setup, could I try to emulate on my machine?

@SheepOfNoise
Copy link
Author

SheepOfNoise commented May 16, 2024 via email

@bpasero
Copy link
Member

bpasero commented May 16, 2024

I am asking specifically about details about the mounted file system: what commands did you use to add the mount, what kind of remote file system is that?

@SheepOfNoise
Copy link
Author

SheepOfNoise commented May 16, 2024 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request Request for new features or functionality file-watcher File watcher
Projects
None yet
Development

No branches or pull requests

2 participants