We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents ca5d5bf + 1aef766 commit a0a22bdCopy full SHA for a0a22bd
cmd/buildctl/common/common.go
@@ -16,6 +16,8 @@ import (
16
"github.com/pkg/errors"
17
"github.com/urfave/cli"
18
"go.opentelemetry.io/otel/trace"
19
+ "google.golang.org/grpc"
20
+ "google.golang.org/grpc/backoff"
21
)
22
23
// ResolveClient resolves a client from CLI args
@@ -67,6 +69,12 @@ func ResolveClient(c *cli.Context) (*client.Client, error) {
67
69
68
70
opts := []client.ClientOpt{client.WithFailFast()}
71
72
+ backoffConfig := backoff.DefaultConfig
73
+ backoffConfig.MaxDelay = 1 * time.Second
74
+ opts = append(opts, client.WithGRPCDialOption(
75
+ grpc.WithConnectParams(grpc.ConnectParams{Backoff: backoffConfig}),
76
+ ))
77
+
78
ctx := CommandContext(c)
79
80
if span := trace.SpanFromContext(ctx); span.SpanContext().IsValid() {
0 commit comments