-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
BuildKit caching ignores file content when (m)Time changes #1106
Comments
wonder if this is related to #1099 |
Test case:
Next run:
As you can see, step 7 should be cached, but isn't. Switching back to normal Docker build correctly does cache this step. |
Related bug/MR from Docker: moby/moby#12031 |
You need to provide a reproducible testcase. Git clone is not guaranteed to be deterministic.
|
Also, note that efficiently caching wildcards had issues in 18.09 that I assume you are using #573 . Fixed in 19.03 |
Yes, thank you, an upgrade to 19.03 did indeed fix it (incidentally, the calling PC already had 19.03, but it used a remote Docker host which was still at 18.09, explaining why my initial go-to solution ("upgrade and see if it's still happening") didn't work. I'm closing this, since I guess my title was incorrect. |
This is an old bug that was fixed in Docker proper years ago, but seems to have made it into BuildKit: if a file has changed timing, but identical content, the cache is still invalidated. This means the common practice of git clone x, build, will always invalidate all file based caching, which is generally not what one wants.
The text was updated successfully, but these errors were encountered: