Missing lock in cache feature #2589
Labels
area/caching
For all bugs related to cache issues
issue/unexpected-EOF
kind/enhancement
New feature or request
kind/feature-request
priority/p2
High impact feature/bug. Will get a lot of users happy
In my workflow, I first use Kaniko Warmer to cache the base image specified in the 'FROM' instruction, and then proceed with a no-push Kaniko build.
However, during this process, I have noticed that the cache feature lacks a file lock. This not only results in redundant image downloads but also leads to errors during the build process with the base image.
I have observed that the cache feature in Kaniko writes to the cache directory after the image download is complete. This creates a situation where multiple concurrent caching tasks perceive the cache was missed, and download the image separately. As a result, some tasks finish faster and proceed to the Kaniko build stage. However, slower caching tasks may complete later and overwrite the existing cache files, that the cache is already in use.
I believe it caused the error during unpacking:
error building image: error building stage: failed to get filesystem from image: unexpected EOF
I think a lock is essential for any robust caching feature. I would like to discuss whether the lock feature is necessary and consider the possibility of adding it to Kaniko.
The text was updated successfully, but these errors were encountered: