diff --git a/client/client.go b/client/client.go index ea8b0e0e0b65..1a11aa2409d6 100644 --- a/client/client.go +++ b/client/client.go @@ -59,9 +59,6 @@ func New(ctx context.Context, address string, opts ...ClientOpt) (*Client, error var creds *withCredentials for _, o := range opts { - if _, ok := o.(*withFailFast); ok { - gopts = append(gopts, grpc.FailOnNonTempDialError(true)) - } if credInfo, ok := o.(*withCredentials); ok { if creds == nil { creds = &withCredentials{} @@ -216,14 +213,6 @@ func (c *Client) Close() error { return c.conn.Close() } -type withFailFast struct{} - -func (*withFailFast) isClientOpt() {} - -func WithFailFast() ClientOpt { - return &withFailFast{} -} - type withDialer struct { dialer func(context.Context, string) (net.Conn, error) } diff --git a/cmd/buildctl/common/common.go b/cmd/buildctl/common/common.go index 2f32b71f0da5..f8f5fa1223a0 100644 --- a/cmd/buildctl/common/common.go +++ b/cmd/buildctl/common/common.go @@ -65,10 +65,8 @@ func ResolveClient(c *cli.Context) (*client.Client, error) { key = c.GlobalString("tlskey") } - opts := []client.ClientOpt{client.WithFailFast()} - ctx := CommandContext(c) - + var opts []client.ClientOpt if span := trace.SpanFromContext(ctx); span.SpanContext().IsValid() { opts = append(opts, client.WithTracerProvider(span.TracerProvider())) diff --git a/examples/build-using-dockerfile/main.go b/examples/build-using-dockerfile/main.go index 0368ee8e5605..8acfc4e768c2 100644 --- a/examples/build-using-dockerfile/main.go +++ b/examples/build-using-dockerfile/main.go @@ -80,7 +80,7 @@ func action(clicontext *cli.Context) error { if tag := clicontext.String("tag"); tag == "" { return errors.New("tag is not specified") } - c, err := client.New(ctx, clicontext.String("buildkit-addr"), client.WithFailFast()) + c, err := client.New(ctx, clicontext.String("buildkit-addr")) if err != nil { return err }