Skip to content
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

bake: avoid evaluating parent targets before child LLB loaded #2265

Merged
merged 1 commit into from
Feb 21, 2024

Conversation

tonistiigi
Copy link
Member

Because of the way buildkit cache works if you have request with external cache, if some vertices from the request have already been evaluated and are available in the shared graph BuildKit will not load cache keys from external source for such vertices. This may mean that children of such vertices will not load cache because there isn't a cache path through the parent.

To work around it, wait before child definition is loaded before evaluating the parent.

fix #2144

Because of the way buildkit cache works if you have request
with external cache, if some vertices from the request have
already been evaluated and are available in the shared graph
BuildKit will not load cache keys from external source for such
vertices. This may mean that children of such vertices will
not load cache because there isn't a cache path through the parent.

To work around it, wait before child definition is loaded before
evaluating the parent.

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
@crazy-max crazy-max merged commit 414f215 into docker:master Feb 21, 2024
63 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bake: Cache of child target gets invalidated by COPY in parent
2 participants