import: don't forget to set other cache config options (#9423)

This commit is contained in:
Ruslan Kuprieiev
2023-05-16 15:53:41 +03:00
committed by GitHub
parent be0a1a4a12
commit e69deaa132
2 changed files with 5 additions and 2 deletions
+4 -1
View File
@@ -79,11 +79,14 @@ class RepoDependency(Dependency):
) -> "DVCFileSystem": ) -> "DVCFileSystem":
from dvc.fs import DVCFileSystem from dvc.fs import DVCFileSystem
config = {"cache": self.repo.config["cache"]}
config["cache"]["dir"] = self.repo.cache.local.path
return DVCFileSystem( return DVCFileSystem(
url=self.def_repo[self.PARAM_URL], url=self.def_repo[self.PARAM_URL],
rev=rev or self._get_rev(locked=locked), rev=rev or self._get_rev(locked=locked),
subrepos=True, subrepos=True,
config={"cache": {"dir": self.repo.cache.local.path}}, config=config,
) )
def _get_rev(self, locked: bool = True): def _get_rev(self, locked: bool = True):
+1 -1
View File
@@ -34,7 +34,7 @@ dependencies = [
"configobj>=5.0.6", "configobj>=5.0.6",
"distro>=1.3", "distro>=1.3",
"dpath<3,>=2.1.0", "dpath<3,>=2.1.0",
"dvc-data>=0.49.1,<0.50", "dvc-data>=0.51.0,<0.52",
"dvc-http>=2.29.0", "dvc-http>=2.29.0",
"dvc-render>=0.3.1,<1", "dvc-render>=0.3.1,<1",
"dvc-studio-client>=0.9.0,<1", "dvc-studio-client>=0.9.0,<1",