mirror of
https://gitea.com/Lydanne/buildx.git
synced 2025-07-09 21:17:09 +08:00
vendor: update buildkit to opentelemetry support
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
This commit is contained in:
16
vendor/github.com/moby/buildkit/util/flightcontrol/flightcontrol.go
generated
vendored
16
vendor/github.com/moby/buildkit/util/flightcontrol/flightcontrol.go
generated
vendored
@ -39,7 +39,7 @@ func (g *Group) Do(ctx context.Context, key string, fn func(ctx context.Context)
|
||||
return v, err
|
||||
}
|
||||
// backoff logic
|
||||
if backoff >= 3*time.Second {
|
||||
if backoff >= 15*time.Second {
|
||||
err = errors.Wrapf(errRetryTimeout, "flightcontrol")
|
||||
return v, err
|
||||
}
|
||||
@ -132,8 +132,16 @@ func (c *call) wait(ctx context.Context) (v interface{}, err error) {
|
||||
select {
|
||||
case <-c.ready:
|
||||
c.mu.Unlock()
|
||||
<-c.cleaned
|
||||
return nil, errRetry
|
||||
if c.err != nil { // on error retry
|
||||
<-c.cleaned
|
||||
return nil, errRetry
|
||||
}
|
||||
pw, ok, _ := progress.NewFromContext(ctx)
|
||||
if ok {
|
||||
c.progressState.add(pw)
|
||||
}
|
||||
return c.result, nil
|
||||
|
||||
case <-c.ctx.done: // could return if no error
|
||||
c.mu.Unlock()
|
||||
<-c.cleaned
|
||||
@ -141,7 +149,7 @@ func (c *call) wait(ctx context.Context) (v interface{}, err error) {
|
||||
default:
|
||||
}
|
||||
|
||||
pw, ok, ctx := progress.FromContext(ctx)
|
||||
pw, ok, ctx := progress.NewFromContext(ctx)
|
||||
if ok {
|
||||
c.progressState.add(pw)
|
||||
}
|
||||
|
Reference in New Issue
Block a user