Skip to content

Conversation

rgoya
Copy link
Contributor

@rgoya rgoya commented Jun 12, 2025

Fixes #10777

Currently: Repo.site_cache_dir() in dvc/repo/__init__.py selects first the configuration read in the config file, and if it does not exist it relies on dirs.site_cache_dir() to pick a value.

The documentation states that DVC_DITE_CACHE_DIR should override this configuration, therefore the order of priority for selecting the site_cache_dir is:

  1. DVC_SITE_CACHE_DIR
  2. core.site_cache_dir
  3. platformdirs selection

For this, dirs.site_cache_dir() needs to know the three options.

This PR:

  • enables dirs.site_cache_dir() to receive a configuration option so it can make the right choice between the three values;
  • modifies Repo.site_cache_dir() to send core.site_cache_dir instead of picking itself; and
  • enables tests for the proper return values.

Thank you for the contribution - we'll try to review it as soon as possible. 🙏

@github-project-automation github-project-automation bot moved this to Backlog in DVC Jun 12, 2025
Copy link

codecov bot commented Jun 12, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 91.06%. Comparing base (2431ec6) to head (a9f9ea7).
Report is 67 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #10778      +/-   ##
==========================================
+ Coverage   90.68%   91.06%   +0.38%     
==========================================
  Files         504      504              
  Lines       39795    40016     +221     
  Branches     3141     3162      +21     
==========================================
+ Hits        36087    36441     +354     
+ Misses       3042     2948      -94     
+ Partials      666      627      -39     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@skshetry skshetry merged commit c7c7ba6 into iterative:main Jun 12, 2025
41 checks passed
@github-project-automation github-project-automation bot moved this from Backlog to Done in DVC Jun 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

DVC_SITE_CACHE_DIR environment variable does not override .dvc/config settings
2 participants