deps: bump dvc-data to 0.38.1 (#8976)

This commit is contained in:
Ruslan Kuprieiev
2023-02-07 06:58:15 +02:00
committed by GitHub
parent 037e2e54f0
commit a8a5b29fb7
5 changed files with 26 additions and 14 deletions
-2
View File
@@ -572,8 +572,6 @@ class Output:
)
if self.stage.is_import and not self.stage.is_repo_import:
dep = self.stage.deps[0]
entry.fs = dep.fs
entry.path = dep.fs_path
entry.meta = dep.meta
if not entry.obj:
if not dep.obj and dep.files:
+1 -1
View File
@@ -94,7 +94,7 @@ def _diff(
with_missing
and change.old
and change.old.hash_info
and not old.odb_map[change.key].exists(change.old.hash_info.value)
and not old.storage_map[change.key].odb.exists(change.old.hash_info.value)
):
# NOTE: emulating previous behaviour
_add_change("not_in_cache", change)
+11 -4
View File
@@ -286,7 +286,7 @@ class Index:
from collections import defaultdict
from dvc.config import NoRemoteError
from dvc_data.index import DataIndex
from dvc_data.index import DataIndex, Storage
by_workspace: dict = defaultdict(DataIndex)
@@ -304,12 +304,19 @@ class Index:
entry.key = key
data_index.add(entry)
data_index.odb_map[key] = out.odb
storage = Storage(odb=out.odb)
try:
data_index.remote_map[key] = self.repo.cloud.get_remote_odb(out.remote)
storage.remote = self.repo.cloud.get_remote_odb(out.remote)
except NoRemoteError:
pass
if out.stage.is_import and not out.stage.is_repo_import:
dep = out.stage.deps[0]
storage.fs = dep.fs
storage.path = dep.fs_path
data_index.storage_map[key] = storage
return dict(by_workspace)
@staticmethod
@@ -523,7 +530,7 @@ def build_data_index(
state=index.repo.state,
)
except FileNotFoundError:
out_entry = DataIndexEntry(path=out_path, fs=fs)
out_entry = DataIndexEntry()
out_entry.key = key
data.add(out_entry)
+13 -6
View File
@@ -118,12 +118,12 @@ def fetch_worktree(
):
remote_obj = _get_remote(repo, remote_name, remote, "fetch")
index = view.data["repo"]
for key, entry in index.iteritems():
entry.fs = remote_obj.fs
entry.path = remote_obj.fs.path.join(
remote_obj.path,
*key,
)
for key in index.storage_map:
storage = index.storage_map[key]
storage.fs = remote_obj.fs
storage.path = remote_obj.fs.path.join(remote_obj.path, *key)
index.storage_map[key] = storage
total = len(index)
with Callback.as_tqdm_callback(
unit="file",
@@ -368,6 +368,13 @@ def _get_diff_indexes(
old.add(entry)
for _, entry in remote_index.iteritems(key):
new.add(entry)
for prefix, storage in local_index.storage_map.items():
old.storage_map[prefix] = storage
for prefix, storage in remote_index.storage_map.items():
new.storage_map[prefix] = storage
return old, new
+1 -1
View File
@@ -53,7 +53,7 @@ dependencies = [
"dvc-render==0.1.0",
"dvc-task==0.1.11",
"dvclive>=1.2.2",
"dvc-data==0.37.8",
"dvc-data==0.38.1",
"dvc-http",
"hydra-core>=1.1.0",
"iterative-telemetry==0.0.7",