-
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
Don't recreate cached layers #715
Conversation
Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). 📝 Please visit https://cla.developers.google.com/ to sign. Once you've signed (or fixed any issues), please reply here (e.g. What to do if you already signed the CLAIndividual signers
Corporate signers
ℹ️ Googlers: Go here for more info. |
09538bc
to
b64f234
Compare
I signed it! |
CLAs look good, thanks! ℹ️ Googlers: Go here for more info. |
1 similar comment
CLAs look good, thanks! ℹ️ Googlers: Go here for more info. |
ff453ac
to
463c64c
Compare
0ec0374
to
89bba94
Compare
There is an integration test failing for
|
@eyusupov Thanks for the PR. Can you please add some tests? |
Will do soon! |
This caching optimization reuses existing layer from a cache image for a RUN command instead of unpacking it and recreating. It also helps with multi-stage build caching issues - when recreating cached layers, some attributes like timestamps are not recreated and the digest for the new first stage image was different, breaking caching for subsequent stages.
Defer FS state setup until the first cache miss. Cached commands are now uniformly handled by extracting the layer from the cached image. This allows skipping layers unpacking uniformly when they are not required for the stage build.
It needs unpacked FS to check if the workdir exists. Also it can break caching keys if the workdir did not exist.
89bba94
to
760acb8
Compare
@eyusupov This looks great! Please add tests and we will try to get this in! |
Sorry for not coming back to it sooner, will try to do it as soon as I can
…On Fri, 27 Sep 2019, 23:17 Tejal Desai, ***@***.***> wrote:
@eyusupov <https://github.com/eyusupov> This looks great! Please add
tests and we will try to get this in!
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#715?email_source=notifications&email_token=AABKKDV3CKPIPHLVD77K2K3QLZS4HA5CNFSM4IECYDFKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD7Z7PQY#issuecomment-536082371>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AABKKDQ4AD4WAVAIK46UMMDQLZS4HANCNFSM4IECYDFA>
.
|
This is huge for my team. The step of creating the new archive from exactly the same content as the prior archive is causing a significant slow-down in our build pipeline due to the number of files (this is a LARGE NodeJS project). |
I'm going to close this. #882 will be merged in favor |
This caching optimization reuses existing layer from a cache image for a RUN command instead of unpacking it and recreating.
It also helps with multi-stage build caching issues like this #575. The issue is that when recreating cached layers, some attributes like timestamps are not recreated and the digest for the new first stage image was different, breaking caching for subsequent stages.