-
-
Notifications
You must be signed in to change notification settings - Fork 420
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
All inotify filesystem events are chmod/attribute events #1244
Comments
I'm considering switching to Colima and encountered the same issue with ATTRIB/CHMOD in environment like the one described above. |
After taking a peek at the code, I see that we are replicating the events by doing a chmod call in the VM OS: https://github.com/abiosoft/colima/blob/main/daemon/process/inotify/events.go#L104 Maybe it would work better if we instead used this command instead?
Which triggers the following events on my local machine:
Of course it makes sense to do something similar written in native go, like issuing a |
This was actually a delibrate compromise. If you look through the linked thread, you would notice that multiple attempts were made before resorting to this approach, which seems to work best for most users. |
I see, but I think the main alternative that was discussed was the |
@abiosoft Thanks for clarification. I understand the deliberate compromise made here but I'm wondering if you would be open to having something like @vansante described earlier under a different configuration flag (maybe do the empty space append on files matching a glob pattern). Something like this might break some workflows but also it would enable others, so maybe it's worth having it with the clear mention of the pitfalls (experimental options after all). Also thank your for Colima! I'm actually excited to use it to replace Docker Desktop after I figure out some quirks related to my work. |
I know the thread is very noisy, but I think you can follow it a bit from here #261 (comment). I am not sure how quickly I would get to this, but yeah I can introduce a config/flag that would write empty bytes. Like it was mentioned in the thread, the issue with this approach is that some editors get confused and give a poor user experience by indicating that the file has been modified externally. |
@abiosoft Thanks for the additional details. The external modification in editors is tricky to handle indeed, since a lot (most?) editors used today will complain about that. I'll try to build a PoC and see how that fares. |
Description
As reported here by @ploxiln colima only seems to forward
ATTRIB
events, even when actually modifying files.See this log:
I have a file watcher utility that ignores these and only recompiles on modify events, so it would be nice if this could be addressed.
Version
(I do not use qemu but vz and rosetta)
Operating System
Output of
colima status
Reproduction Steps
inotifywait -m -r .
touch test && echo hello >> test
Expected behaviour
I expect the container inotifywait command to issue 2 events:
I do not expect an attribute event
Additional context
No response
The text was updated successfully, but these errors were encountered: