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

dvc: separate cache and tree hashes #4511

Merged
merged 1 commit into from
Sep 1, 2020
Merged

Conversation

efiop
Copy link
Contributor

@efiop efiop commented Sep 1, 2020

Related to #4144 , #3069 , #1676

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


hi, tmp_info = self._get_dir_info_hash(dir_info)
if hash_info:
assert hi == hash_info
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Will go away in the next PR when we support md5s for external dirs. Just a sanity check for now.

@efiop efiop changed the title dvc: separate cache and tree hashes [WIP] dvc: separate cache and tree hashes Sep 1, 2020
@efiop efiop changed the title [WIP] dvc: separate cache and tree hashes dvc: separate cache and tree hashes Sep 1, 2020
@efiop efiop merged commit 9887de6 into iterative:master Sep 1, 2020
@@ -7,6 +7,7 @@
class HashInfo:
name: str
value: str
dir_info: list = field(default=None, compare=False)
Copy link
Member

Choose a reason for hiding this comment

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

Is it possible to have a non-nullable HashInfo, i.e. without name and value being None?
I understand that it's just a simple container, but I want to avoid possibilities of hash_info being:

  1. None
  2. A regular hash_info
  3. hash_info with value=None.

1 and 2 are fine, it'd be safer to avoid 3rd case if we can.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Is it possible to have a non-nullable HashInfo, i.e. without name and value being None?

@skshetry it is not, but we allow it. Very good points! I also thought about it, but decided not to mess with it for now. Ideally thinking about making this dataclass read-only, so everything will be set when creating an instance and so we can put appropriate checks/asserts for such things

@skshetry skshetry added the refactoring Factoring and re-factoring label Sep 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
refactoring Factoring and re-factoring
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants