-
Notifications
You must be signed in to change notification settings - Fork 274
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
[FEATURE]: Add AWS ECR to supported multi-stage build caching registries for cluster-buildkit #5683
Comments
@alexkuretz thank you for reporting this! We'll look into it. |
Fixes #5683 AWS ECR now supports mode=max together with an extra option `image-manifest=true`. See also https://aws.amazon.com/blogs/containers/announcing-remote-cache-support-in-amazon-ecr-for-buildkit-clients/
@alexkuretz I implemented AWS ECR mode=max support in #5758 Thanks for letting us know! By the way, you should be able to save even more time in pull requests by only exporting cache manifests on main, e.g. like this:
This also helps avoiding pollution of the cache by random changes in PRs. |
…ode (#5758) **What this PR does / why we need it**: AWS ECR now supports `mode=max` together with an extra option `image-manifest=true`. See also https://aws.amazon.com/blogs/containers/announcing-remote-cache-support-in-amazon-ecr-for-buildkit-clients/ **Which issue(s) this PR fixes**: Fixes #5683 **Special notes for your reviewer**:
@alexkuretz would be happy to hear if this works for you. You can try it out by updating to edge-bonsai using the command |
Thanks for adding this, it does appear to be working, we're seeing manifests show up in ECR now instead of just images. |
I'll add that as we've updated projects to use the new caching we've seen some strange build failures. Deleting the old build_* cache images in ECR seems to resolve it. |
Feature Request
Background / Motivation
AWS and Buildkit now properly support OCI-compliant manifests and layer caching for multi-stage builds. This became available last year in buildkit 0.12.0 and more recently in Docker 25.
aws/containers-roadmap#876
Garden documentation is out of date in this regard.
I tested this by setting
mode=max
in cluster-buildkit cache settings in project.garden.yml:and setting extraFlags in garden.yml:
#27 writing cache image manifest sha256:cdb42224716cc1392ebbe44e6d9075f6a84cfc758b79f431c55a96ea5c285128 0.2s done
And in the "Artifact Type detail" for the _buildcache-main image in ECR:
Some initial quick testing showed an moderate decrease in build times. Between clean tests I deleted images from ECR.
Default cluster-buildkit caching:
Initial clean build took 16m 1s, changing one line in one source file and rebuilding took 12m 9s.
cluster-buildkit with mode=max and image-manifest=true:
Initial clean build took 17m 23s, same one-line change and rebuilding took 9m 42s.
Related issues:
#3110
#3219
What should the user be able to do?
Enable
mode=max
and setimage-manifest=true
Why do they want to do this? What problem does it solve?
Speed up builds by caching layers in multi-stage builds
Suggested Implementation(s)
Suggest adding AWS ECR to the garden list of supported registries, setting
mode=max
by default and addimage-manifest=true
to the--export-cache
optionsHow important is this feature for you/your team?
🌵 Not having this feature makes using Garden painful
The text was updated successfully, but these errors were encountered: