-
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
tests: cover run cache with functional tests #4018
Conversation
return len([os.path.join(r, f) for r, _, fs in os.walk(path) for f in fs]) | ||
|
||
|
||
def test_push_pull(tmp_dir, dvc, erepo_dir, run_copy, setup_remote): |
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.
The tests that are missing now are either low-level tests (which I don't really want to add), and more-higher level tests (eg: that covers CML like use-cases where you push to remote storage and remote branch, get contents to a different machine and try to repro or run).
@@ -177,11 +178,19 @@ def _transfer(func, from_remote, to_remote): | |||
|
|||
def push(self, remote): | |||
remote = self.repo.cloud.get_remote(remote) | |||
return self._transfer(remote.upload, self.repo.cache.local, remote) | |||
return self._transfer( | |||
_log_exceptions(remote.tree.upload, "upload"), |
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.
Added this without moving it to utils or anything. This is a temporary hack, our tree/remote/cache separation will soon allow us to properly handle this. Ideally, we would want to make remote handle run-cache by itself, since it is really not that much different from regular cache, just that the location is unusual.
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.
Thanks for the help.
Also, I tried to fix #4016, and also fix discrepancies in push/fetch counts.
β 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. π