Skip to content

Commit 4a2a558

Browse files
authored
Merge pull request #6940 from crazy-max/revert-buildctl-trace-timeout
buildctl: revert trace shutdown timeout
2 parents f6b91b2 + b2d2eda commit 4a2a558

1 file changed

Lines changed: 1 addition & 11 deletions

File tree

cmd/buildctl/common/trace.go

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,21 +3,17 @@ package common
33
import (
44
"context"
55
"os"
6-
"time"
76

87
"github.com/moby/buildkit/util/appcontext"
98
"github.com/moby/buildkit/util/tracing/delegated"
109
"github.com/moby/buildkit/util/tracing/detect"
11-
"github.com/pkg/errors"
1210
"github.com/urfave/cli/v3"
1311
"go.opentelemetry.io/otel/attribute"
1412
"go.opentelemetry.io/otel/codes"
1513
sdktrace "go.opentelemetry.io/otel/sdk/trace"
1614
"go.opentelemetry.io/otel/trace"
1715
)
1816

19-
const exportTimeout = 50 * time.Millisecond
20-
2117
func AttachAppContext(app *cli.Command) error {
2218
baseCtx := appcontext.Context()
2319

@@ -79,13 +75,7 @@ func AttachAppContext(app *cli.Command) error {
7975
span.End()
8076
}
8177

82-
// Set a rather aggressive timeout for shutting down the tracer provider
83-
// to ensure we don't stall on a non-responsive tracing endpoint for too long
84-
// on shutdown.
85-
ctx, cancel := context.WithTimeoutCause(appcontext.Shutdown(), exportTimeout, errors.WithStack(context.DeadlineExceeded))
86-
defer cancel()
87-
88-
return tp.Shutdown(ctx)
78+
return tp.Shutdown(context.TODO())
8979
}
9080
return nil
9181
}

0 commit comments

Comments
 (0)