-
Notifications
You must be signed in to change notification settings - Fork 660
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
Recursive symlink created in .cache can prevent pip from installing current repository #1566
Comments
- instead of in-repo .cache folder make use of ~/.cache - use a hash based on project_dir path to avoid cross-contamination between various projects Fixes: #1566
- instead of in-repo .cache folder make use of ~/.cache - use a hash based on project_dir path to avoid cross-contamination between various projects Fixes: #1566
- instead of in-repo .cache folder make use of ~/.cache - use a hash based on project_dir path to avoid cross-contamination between various projects Fixes: #1566
Given the change in the default |
There is no need to exclude ~/.cache because is outside current repository anyway, which is almost for sure a subfolder inside user home, or anywhere else, but still never a folder that includes user home directory. |
That makes sense -- however, in that case, do you have any suggestions on how to prevent the linter from linting external roles installed by molecule's requirements file (example here)? (I can open a new issue if you think this might be an actual issue instead of PBKAC.) |
Just upgrade molecule and the linter to latest versions, remove existing in-repo .cache folder(s) and run again, it should work fine. |
So I upgraded both Molecule to |
Upstream bug pypa/pip#10005 can prevent users of ansible-lint and molecule from installing current repository, as pip would endup with an endless loop trying to copy the code.
We rely on those symlinks in order to avoid copying the source code inside the ansible-environments (where we keep roles and collections used during testing).
As even if pip fixes the bug we will continue to see such problems with users that use older versions of pip, we should consider which workarounds we have. So far I identified:
.cache
directory default to be.tox/.cache
as this folder is ignored by pip by default. This is low effort and low risk approach~/.cache
for caching. This requires us to use a hash to distinguish between various repositories and also makes me wonder if it may cause other problems when home directory may not be on the same partition as the project_dir, as I am not sure if those symlinks would work. Cleaning up that centralized .cache is another issue that concerns me but we can delay fixing it for a later time (not really being a blocker).The text was updated successfully, but these errors were encountered: