-
Notifications
You must be signed in to change notification settings - Fork 14.5k
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
Speed up image building in CI by exporting and importing mount cache #45314
Speed up image building in CI by exporting and importing mount cache #45314
Conversation
And here is caching of the "cache-mount" as well cc: @gopidesupavan |
First tests show that we can go down to < 2 minutes from ~6 minutes to build the image |
7b1ebeb
to
d6c758a
Compare
d6c758a
to
96ca5fa
Compare
96ca5fa
to
1417d17
Compare
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 , useful with breeze commands
Nice improvement :) |
7504d5f
to
f4cd2ba
Compare
f4cd2ba
to
e7987e1
Compare
During the build, cache of ``uv`` and ``pip`` is stored in a separate "cache mount" volum that is mounted during the build. This cache mount volume is preserved between builds and can be exported and imported to speed up the build process in CI - where cache is stored as artifact and can be imported in the next build. This PR implements it: * export and import commands are added to breeze to export/import cache mount content * the cache mount content is stashed as artifact in the build after image is built and it is restored before the image is built
e7987e1
to
7d411b1
Compare
Finally: 3m30 s. to build the image instead of 5m47. Not as fast as the fastest "registry" build we had (1m20s or so ) but "fast enough" |
The apache#45314 introduced the bug where image artifacts were not uploaded alongside cache mount artifacts. It caused all PRs to be tested with "main" version of code.
The #45314 introduced the bug where image artifacts were not uploaded alongside cache mount artifacts. It caused all PRs to be tested with "main" version of code.
During the build, cache of
uv
andpip
is stored in a separate "cache mount" volum that is mounted during the build. This cache mount volume is preserved between builds and can be exported and imported to speed up the build process in CI - where cache is stored as artifact and can be imported in the next build.This PR implements it:
export and import commands are added to breeze to export/import cache mount content
the cache mount content is stashed as artifact in the build after image is built and it is restored before the image is built
^ Add meaningful description above
Read the Pull Request Guidelines for more information.
In case of fundamental code changes, an Airflow Improvement Proposal (AIP) is needed.
In case of a new dependency, check compliance with the ASF 3rd Party License Policy.
In case of backwards incompatible changes please leave a note in a newsfragment file, named
{pr_number}.significant.rst
or{issue_number}.significant.rst
, in newsfragments.