Issues #2241 #1678 both point to cases where renames can point to incorrect images being used with caching. This commit adds the path of the file (relative to the build context to the hash).
A different approach would be to change the underlying function in CacheHasher to include the name (and maybe file size), this was avoided for two reasons:
It was unclear whether this would change or break the computed digests outside the context of caching.
The CacheHasher does not know the prefix to strip in the filename to compute the hash.
Submitter Checklist
These are the criteria that every PR should meet, please check them off as you
review them:
Fixes #2241 #1678
Description
Issues #2241 #1678 both point to cases where renames can point to incorrect images being used with caching. This commit adds the path of the file (relative to the build context to the hash).
A different approach would be to change the underlying function in CacheHasher to include the name (and maybe file size), this was avoided for two reasons:
Submitter Checklist
These are the criteria that every PR should meet, please check them off as you review them:
See the contribution guide for more details.
Reviewer Notes
Release Notes
Describe any changes here so maintainer can include it in the release notes, or delete this block.