-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use filename in cache key to prevent collisions under rename
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: 1. It was unclear whether this would change or break the computed digests outside the context of caching. 2. The CacheHasher does not know the prefix to strip in the filename to compute the hash.
- Loading branch information
Steve Ramage
committed
Jun 16, 2024
1 parent
ad1896a
commit f2ef2b3
Showing
2 changed files
with
98 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters