Skip to content
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

Merged
merged 2 commits into from
Jun 11, 2020

Conversation

skshetry
Copy link
Member

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. πŸ™

@skshetry skshetry requested a review from efiop June 11, 2020 10:51
@skshetry skshetry self-assigned this Jun 11, 2020
dvc/stage/cache.py Outdated Show resolved Hide resolved
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):
Copy link
Member Author

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).

@efiop efiop added this to Review in progress in DVC 2 - 16 June 2020 Jun 11, 2020
@@ -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"),
Copy link
Member

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.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the help.

@efiop efiop merged commit 2e12a31 into iterative:master Jun 11, 2020
DVC 2 - 16 June 2020 automation moved this from Review in progress to Done Jun 11, 2020
@skshetry skshetry deleted the test-run-cache branch June 11, 2020 16:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Development

Successfully merging this pull request may close these issues.

run cache: push/pull is broken
2 participants