Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Check symlinks support per directory instead of globally #1077

Merged
merged 3 commits into from
Sep 23, 2022

Conversation

Wauplin
Copy link
Contributor

@Wauplin Wauplin commented Sep 23, 2022

Related to #1062 (comment).

Issue is that we were checking the support of symlinks globally (in /tmp) instead of a per-folder check. This can be an used if the cache dir and the tmp dir are mounted on different volumes with different rules. This implementation should not be safer.

Also, warning message is displayed once per cache dir in use. In a vast majority of cases this means once per runtime since cache directory usually don't change.

@HuggingFaceDocBuilderDev
Copy link

HuggingFaceDocBuilderDev commented Sep 23, 2022

The documentation is not available anymore as the PR was closed or merged.

@codecov
Copy link

codecov bot commented Sep 23, 2022

Codecov Report

Base: 84.36% // Head: 84.68% // Increases project coverage by +0.32% 🎉

Coverage data is based on head (ff2d2f0) compared to base (e8801bd).
Patch coverage: 100.00% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1077      +/-   ##
==========================================
+ Coverage   84.36%   84.68%   +0.32%     
==========================================
  Files          40       38       -2     
  Lines        4100     3925     -175     
==========================================
- Hits         3459     3324     -135     
+ Misses        641      601      -40     
Impacted Files Coverage Δ
src/huggingface_hub/file_download.py 88.66% <100.00%> (+0.17%) ⬆️
src/huggingface_hub/lfs.py
src/huggingface_hub/__init__.py

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

Copy link
Member

@LysandreJik LysandreJik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me, thank you @Wauplin

@Wauplin Wauplin merged commit 7d8854c into main Sep 23, 2022
@Wauplin Wauplin deleted the 1062-check-symlink-supported-in-cache-dir branch September 23, 2022 13:56
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants