Merge pull request #2265 from tonistiigi/bake-parent-eval

bake: avoid evaluating parent targets before child LLB loaded
This commit is contained in:
CrazyMax 2024-02-21 11:46:12 +01:00 committed by GitHub
commit 414f215929
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -759,6 +759,11 @@ func BuildWithResultHandler(ctx context.Context, nodes []builder.Node, opt map[s
results.Set(rKey, res)
if children, ok := childTargets[rKey]; ok && len(children) > 0 {
// wait for the child targets to register their LLB before evaluating
_, err := results.Get(ctx, children...)
if err != nil {
return nil, err
}
// we need to wait until the child targets have completed before we can release
eg, ctx := errgroup.WithContext(ctx)
eg.Go(func() error {