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
Expose full SHA256 hash in file name placeholders #2770
Conversation
Currently, `[hash]` is truncated to 8 characters, so add another placeholder `[fullhash]` to gain access to the untruncated value.
I still wonder how many billions of builds you deploy each day to get a reasonable risk of a hash collision. Previous hashing issues had nothing to do with this. |
@lukastaegert I agree that the risk of collision is relatively small; but I find it odd that the full checksum is calculated but never publicly accessible. Yes, I understand that previous hashing issues were due to ordering and race conditions and not due to collisions. Alternatively, the full checksum could be available to a custom function if #2585 is implemented. |
This would of course be the best solution but for the time being, providing |
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.
In order to merge this, we need a test that uses the new name pattern element.
Also, it needs to be documented in the "big list of options" in the docs folder. |
Probably |
@mislav Would you be up for adding the tests requested? It also looks like your fork could use a rebase and a few conflicts need to be addressed. |
I haven't had time to rebase or to figure out where or how to add the new tests. Other people are welcome to use my branch as the starting point of implementing the same or similar feature. 🙇 |
This PR contains:
Are tests included?
Breaking Changes?
Description
Currently,
[hash]
is truncated to 8 characters, so add another placeholder[fullhash]
to gain access to the untruncated value. The problem with truncated values is that the risk of collisions is larger.Ideally,
[hash]
would be the full value itself and users could be given some other mechanism of truncating the value to a specific number of characters (e.g.[hash:8]
), but changing that at this point would break backwards compatibility.This is WIP and soliciting feedback! Open questions:
[fullhash]
an OK placeholder name?[hash]
is tested in the first place; many different tests break if I purposely change[hash]
behavior.Thank you!
/cc @keithamus