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

remote: verify cache exists on dir checksum #3225

Merged
merged 1 commit into from
Jan 24, 2020

Conversation

pared
Copy link
Contributor

@pared pared commented Jan 23, 2020

  • ❗ Have you followed the guidelines in the Contributing to DVC list?

  • πŸ“– Check this box if this PR does not require documentation updates, or if it does and you have created a separate PR in dvc.org with such updates (or at least opened an issue about it in that repo). Please link below to your PR (or issue) in the dvc.org repo.

  • ❌ Have you checked DeepSource, CodeClimate, and other sanity checks below? We consider their findings recommendatory and don't expect everything to be addressed. Please review them carefully and fix those that actually improve code or fix bugs.

Thank you for the contribution - we'll try to review it as soon as possible. πŸ™

Fixes #2647

asciicast

@pared pared requested review from efiop and a user January 23, 2020 13:16
@@ -233,6 +241,9 @@ def _collect_dir(self, path_info):
return sorted(result, key=itemgetter(self.PARAM_RELPATH))

def get_dir_checksum(self, path_info):
if not self.cache:
Copy link
Contributor

Choose a reason for hiding this comment

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@efiop Do you mean, using same error in both places, or using self.REMOTE.scheme to point user in right direction?

Copy link
Contributor

Choose a reason for hiding this comment

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

@pared Well, maybe both? :)

@pared pared force-pushed the 2647_no_cache_external_dir branch from 29e55c8 to db0e699 Compare January 24, 2020 09:45
@pared pared requested a review from efiop January 24, 2020 09:51
def __init__(self, scheme):
super().__init__(
"Remote cache for '{}' remote is required to perform this "
"operation".format(scheme)
Copy link
Contributor

Choose a reason for hiding this comment

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

Could we add something helpful or add a link to docs?

Copy link
Contributor

Choose a reason for hiding this comment

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

Also "this operation" is not very clear. Maybe we could include path too to be more precise about what path has caused this exception?

@pared pared force-pushed the 2647_no_cache_external_dir branch 2 times, most recently from 3d63fc0 to 4c7b31d Compare January 24, 2020 11:09
@pared pared requested a review from efiop January 24, 2020 11:11
@pared pared force-pushed the 2647_no_cache_external_dir branch from 4c7b31d to 6557fed Compare January 24, 2020 12:37
Copy link
Contributor

@efiop efiop left a comment

Choose a reason for hiding this comment

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

Thanks!

@efiop efiop merged commit 4457df3 into iterative:master Jan 24, 2020
@pared pared deleted the 2647_no_cache_external_dir branch March 24, 2020 09:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

remote: getting a directory checksum requires uploading a file to an external cache
2 participants