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

Caches that point to a folder with a dash in it somewhere do not work correctly #6

Open
bravoman opened this issue Apr 18, 2023 · 7 comments

Comments

@bravoman
Copy link

I could not get the caches to work for certain folders where a dash was inside the foldername. So something like:

/example/folder-2 
# or 
/example-folder

would not work until I used an underscore for the foldername instead of the dashes.

It's not so much that I could not create a cache of the folders (with dash in the path somewhere). It's more that they were never really used (shown as 'in use' in the mutagen dashboard) until I renamed the folders to use an underscore instead of dash. Even though I made sure that the correct context was used using: '--context=desktop-linux-mutagen'.

@Vmadmax
Copy link

Vmadmax commented Apr 25, 2023

Same issue here.
All dashed folders never get the "in use" status.
Bildschirm­foto 2023-04-25 um 20 05 09

@xenoscopic
Copy link
Member

Thanks for the report on this, sorry it's taken me a few days to get around to it.

@bravoman In your case, is it the cache path having dashes that's causing the issue or is it the mount point within the container having dashes? Or both?

@Vmadmax, I see in your screenshot that the second-to-last cache (the one with "m-w" visible) does indicate "In Use". Is it only certain caches with dashes that seem to have this problem?

@xenoscopic
Copy link
Member

I'm not able to reproduce locally. If you can share an example configuration that can reproduce the issue, that should make it fairly easy to suss out.

Another possibility could be that the UID/GID don't match the container, but that wouldn't be fixed by changing a - to an _.

@bravoman
Copy link
Author

@xenoscopic What specific configs are you looking for?

@bravoman
Copy link
Author

@bravoman In your case, is it the cache path having dashes that's causing the issue or is it the mount point within the container having dashes? Or both?

The cache path contained the dash. The mount path in the container does not contain any dashes in my config. So no experience with that yet.

The UID/GID was not changed to fix my issue (it was both 0 and still is both 0).

@xenoscopic
Copy link
Member

@bravoman I'll be doing some additional work on the extension this weekend, so I'll try a variety of configurations and see if I can figure out what might be causing the problem. But thank you for the additional information, that will be helpful.

@xenoscopic
Copy link
Member

I've spent some time trying to reproduce this problem without any success. I've also looked through the code quite thoroughly, but I don't see anything that would selectively cause issues with - in paths.

Given that the screenshot provided seems to show some of the caches with - characters registering as IN USE, I'm thinking it's probably more likely to be an ownership mismatch issue for those caches which are not being utilized. Although admittedly that doesn't explain why switching from a - to a _ helped.

Would it be possible to run docker run --rm --entrypoint id <image> on the image for the container that's failing to use the cache? And if there's a user specification (e.g. in Compose YAML), instead run docker run --user <user> --rm --entrypoint id <image>?

I think that's the next most logical debugging step. If you'd like to hop on a call to discuss/debug, I'm happy to do that as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants