devspace icon indicating copy to clipboard operation
devspace copied to clipboard

dev: Add option to enable file polling on local system for file syncs 📁 💻

Open sgreene570 opened this issue 2 years ago • 1 comments

Is your feature request related to a problem?

Yes, currently devspace dev local syncs rely on your local directory to emit MODIFY events when a file is updated. This can cause problems when running devspace on top of a vagrant file-share, for example, in which file changes effectively trigger ATTRIB events in place of MODIFY events on the "local" directory via something like https://github.com/adrienkohlbecker/vagrant-fsnotify (events are forwarded and "downgraded" via remote executions of touch, basically).

Note that file polling (in place of inotify watches) is supported as an option on the container end of the file sync, but not on the local side. Note that this is not 100% clear in the v6 docs.

Which solution do you suggest?

Add support for enabling file polling (in place of notify watches) on local system for file syncs

Which alternative solutions exist?

Refactor the "local" inotify watchers to react to ATTRIB events in addition to MODIFY events. This may be noisy and non-ideal, and most likely would not work for all use cases. A file polling fallback could be a catch all for local issues with file syncs.

Additional context

slack conversation xref

/kind feature

sgreene570 avatar Aug 29 '22 14:08 sgreene570

@sgreene570 thanks for creating this issue! Yes we should be able to use something similar to our backend solution.

FabianKramm avatar Sep 01 '22 18:09 FabianKramm