-
-
Notifications
You must be signed in to change notification settings - Fork 647
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
Prefactor: Move get_hash
from docker backend to strutil
#18715
Conversation
Needs CP to 2.1.6.x because #18708 needs it |
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.
Might want to add a summary of what we've discussed here in the doc string for stable_hash()
?
src/python/pants/backend/docker/util_rules/docker_build_context_test.py
Outdated
Show resolved
Hide resolved
Co-authored-by: Jacob Floyd <cognifloyd@gmail.com>
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.
Can leave it or take it regarding my comment on the json encoding.
Hmm I guess one option here is hashing the pickled bytes. That might be more stable? |
Hashing a pickle will not be consistent across versions of python. |
I think that's untrue, so long as we pin the pickle protocol version |
I haven't used pickle much. I didn't know you could pin the pickle protocol - I thought it was merely python-version specific. Good to know. |
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.
I'd say good enough. ;)
(I mean, to cover more bases I think we could do the class name thing for all o
s that is an instance of some class, but as I said.. enough already :p )
Prefactor for #18708