Skip to content

Commit 1133579

Browse files
committed
add initial timeout to driver
Signed-off-by: Viacheslav Vasilyev <[email protected]>
1 parent acdcd79 commit 1133579

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

builder/node.go

+4
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import (
55
"encoding/json"
66
"sort"
77
"strings"
8+
"time"
89

910
"github.com/containerd/platforms"
1011
"github.com/docker/buildx/driver"
@@ -38,6 +39,8 @@ type Node struct {
3839
Labels map[string]string
3940
}
4041

42+
const defaultDriverTimeout = 120 * time.Second
43+
4144
// Nodes returns nodes for this builder.
4245
func (b *Builder) Nodes() []Node {
4346
return b.nodes
@@ -129,6 +132,7 @@ func (b *Builder) LoadNodes(ctx context.Context, opts ...LoadNodesOption) (_ []N
129132
Platforms: n.Platforms,
130133
ContextPathHash: b.opts.contextPathHash,
131134
DialMeta: lno.dialMeta,
135+
Timeout: defaultDriverTimeout,
132136
})
133137
if err != nil {
134138
node.Err = err

0 commit comments

Comments
 (0)