Skip to content

data status: fix remote check progress bar #10804

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

Merged
merged 1 commit into from
Jul 16, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 11 additions & 2 deletions dvc/repo/data.py
Original file line number Diff line number Diff line change
Expand Up @@ -337,7 +337,10 @@ def _get_entries_not_in_remote(
missing_entries = []

storage_map = view.storage_map
with TqdmCallback(size=0, desc="Checking remote", unit="entry") as cb:

n = 0
with TqdmCallback(size=n, desc="Checking remote", unit="entry") as cb:
entries: dict[DataIndexKey, DataIndexEntry] = {}
for key, entry in view.iteritems(shallow=not granular):
if not (entry and entry.hash_info):
continue
Expand All @@ -352,13 +355,19 @@ def _get_entries_not_in_remote(
):
continue

entries[key] = entry
n += 1
cb.set_size(n)

for key, entry in entries.items():
k = (*key, "") if entry.meta and entry.meta.isdir else key
try:
if not storage_map.remote_exists(entry, refresh=remote_refresh):
missing_entries.append(os.path.sep.join(k))
cb.relative_update() # no need to update the size
except StorageKeyError:
pass
finally:
cb.relative_update()
return missing_entries


Expand Down
Loading