Skip to content
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

Missing lock in cache feature #2589

Open
senayuki opened this issue Jun 20, 2023 · 1 comment · May be fixed by #2612
Open

Missing lock in cache feature #2589

senayuki opened this issue Jun 20, 2023 · 1 comment · May be fixed by #2612
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

Comments

@senayuki
Copy link

senayuki commented Jun 20, 2023

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.

@aaron-prindle aaron-prindle added kind/feature-request kind/enhancement New feature or request priority/p2 High impact feature/bug. Will get a lot of users happy area/caching For all bugs related to cache issues labels Jun 20, 2023
@senayuki senayuki linked a pull request Jul 3, 2023 that will close this issue
4 tasks
@iTaybb
Copy link

iTaybb commented Oct 12, 2023

Hey, anything new about this? we also encounter this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants