-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
remote: use progress bar for remote cache query status during dvc gc
#3559
Conversation
def test_cache_checksums(): | ||
remote = RemoteBASE(None, {}) | ||
remote.path_info = PathInfo("foo") | ||
|
||
with mock.patch.object( | ||
remote, "list_cache_paths", return_value=["12/3456", "bar"] | ||
): | ||
checksums = list(remote.cache_checksums()) | ||
assert checksums == ["123456"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this test is for #3558
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@pmrowla Thank you so much! π
logger.debug( | ||
"'%s' doesn't look like a cache file, skipping", path | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is makes push/pull/gc very verbose now to the point that I'm not sure it's worth logging?
...
2020-03-31 18:49:52,911 DEBUG: '/Users/pmrowla/git/remote-1m-files/.dvc/cache/c5/d84d5879b6266fe8624802e99ff211.dir.unpacked/000360c8.txt' doesn't look like a cache file, skipping
2020-03-31 18:49:52,935 DEBUG: '/Users/pmrowla/git/remote-1m-files/.dvc/cache/c5/d84d5879b6266fe8624802e99ff211.dir.unpacked/00001f77.txt' doesn't look like a cache file, skipping
2020-03-31 18:49:53,122 DEBUG: '/Users/pmrowla/git/remote-1m-files/.dvc/cache/c5/d84d5879b6266fe8624802e99ff211.dir.unpacked/000569a4.txt' doesn't look like a cache file, skipping
...
(it catches every unpacked file in local .dvc/cache
)
Prior to #3557 this exception handler was just a pass
in RemoteBASE.all()
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
β I have followed the Contributing to DVC checklist.
π If this PR requires documentation updates, I have created a separate PR (or issue, at least) in dvc.org and linked it here. If the CLI API is changed, I have updated tab completion scripts.
β I will check DeepSource, CodeClimate, and other sanity checks below. (We consider them recommendatory and don't expect everything to be addressed. Please fix things that actually improve code or fix bugs.)
Thank you for the contribution - we'll try to review it as soon as possible. π
dvc gc -c
now uses the same behavior aspush
/pull
when fetching checksums from a remote cacheWill close #3543