-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Do not recompute layers retrieved from cache #882
Do not recompute layers retrieved from cache #882
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm!
47d772c
to
73635b7
Compare
3bd9702
to
9f175a2
Compare
@cvgw Would be able to pick this up for release tomorrow? if not i will rebase and merge. |
@tejal29 do we still want to make this change? I'm not sure what the motivation is now that we've made all the caching fixes. I suppose there could be a performance win here. WDYT? |
Since you have spent cycles on it, we can get this in. Upto you! |
9f175a2
to
1e897e0
Compare
1e897e0
to
cd9be5d
Compare
We should look into how we can measure performance increase due to this PR.
|
@tejal29 Note: early in my Dockerfile is a "RUN npx lerna bootstrap --ci" which installs all the dependencies for the mono-repository. Installing the dependencies takes about 10 minutes, which includes building 15+ local modules. The subsequent archiving takes about 10 minutes. As the dependencies do not change often, having the cache work correctly would trim about 20 minutes from most builds. |
Just for giggles, I used the "gcr.io/kaniko-project/executor:debug-8d9e6b8ea54274f73517f11c113c13cd03d26349" image which appears to have this change. |
Specifically GoogleContainerTools/kaniko#882 Signed-off-by: Andrew Bayer <[email protected]>
Specifically GoogleContainerTools/kaniko#882 Signed-off-by: Andrew Bayer <[email protected]>
Specifically GoogleContainerTools/kaniko#882 Signed-off-by: Andrew Bayer <[email protected]>
Description
Updates kaniko to reuse cached layers rather than recreating the layer.
Previously kaniko would retrieve a layer from the cache, unpack the tar, snapshot the file system, and then repack the tar, recreate the layer. This caused unneeded work repacking the ta. It also resulted in layer and image digests that would change every build due to the tar being repacked.
This change updates kaniko so that the new behavior is
Note that for the moment it is only implemented for RUN and COPY commands.
This eliminates the extra steps of repacking the tar. It also results in layer and image digest which do not change for cached layers.
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