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

Allow user to request a raised exception if hash(content) will be inconsistent #107

Merged
merged 3 commits into from
Jul 14, 2022

Conversation

ptoman-pa
Copy link
Contributor

Allows user to have custom_hasher raise ValueError if it cannot identify a consistent-across-instantiations hash for the object.

This is valuable because we've found it very easy to create artifacts that are impossible to get reused, because they have data in their config that can’t be represented as Python primitives. Currently you can’t possibly know if you’ve created such an artifact until you try to rerun and notice it’s taking a long time / the reuse is not being picked up, or unless you look at the db. This change supports users in reducing the cycle time to identify this error.

Allows user to have custom_hasher raise ValueError if it cannot identify a consistent-across-instantiations hash for the object.

This is valuable because we've found it very easy to create artifacts that are impossible to get reused, because they have data in their config that can’t be represented as Python primitives. Currently you can’t possibly know if you’ve created such an artifact until you try to rerun and notice it’s taking a long time / the reuse is not being picked up, or unless you look at the db. This change supports users in reducing the cycle time to identify this error.
eyadgaran
eyadgaran previously approved these changes Jul 12, 2022
Copy link
Owner

@eyadgaran eyadgaran left a comment

Choose a reason for hiding this comment

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

lgtm

@coveralls
Copy link

Pull Request Test Coverage Report for Build 2668367280

  • 1 of 3 (33.33%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 61.053%

Changes Missing Coverage Covered Lines Changed/Added Lines %
simpleml/persistables/hashing.py 1 3 33.33%
Totals Coverage Status
Change from base Build 2287835176: 0%
Covered Lines: 2751
Relevant Lines: 4631

💛 - Coveralls

@eyadgaran eyadgaran merged commit c1bc79f into eyadgaran:master Jul 14, 2022
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.

3 participants