mirror of
https://gitea.com/Lydanne/buildx.git
synced 2025-05-29 08:57:44 +08:00
Merge pull request #2265 from tonistiigi/bake-parent-eval
bake: avoid evaluating parent targets before child LLB loaded
This commit is contained in:
commit
414f215929
@ -759,6 +759,11 @@ func BuildWithResultHandler(ctx context.Context, nodes []builder.Node, opt map[s
|
|||||||
results.Set(rKey, res)
|
results.Set(rKey, res)
|
||||||
|
|
||||||
if children, ok := childTargets[rKey]; ok && len(children) > 0 {
|
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
|
// we need to wait until the child targets have completed before we can release
|
||||||
eg, ctx := errgroup.WithContext(ctx)
|
eg, ctx := errgroup.WithContext(ctx)
|
||||||
eg.Go(func() error {
|
eg.Go(func() error {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user