mirror of
https://gitea.com/Lydanne/buildx.git
synced 2025-07-09 21:17:09 +08:00
build: add experimental support for print flag
Print flag can be used to make additional information requests about the build and print their results. Currently Dockerfile supports: outline, targets, subrequests.describe Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
This commit is contained in:
6
vendor/github.com/moby/buildkit/util/resolver/retryhandler/retry.go
generated
vendored
6
vendor/github.com/moby/buildkit/util/resolver/retryhandler/retry.go
generated
vendored
@ -14,6 +14,10 @@ import (
|
||||
"github.com/pkg/errors"
|
||||
)
|
||||
|
||||
// MaxRetryBackoff is the maximum backoff time before giving up. This is a
|
||||
// variable so that code which embeds BuildKit can override the default value.
|
||||
var MaxRetryBackoff = 8 * time.Second
|
||||
|
||||
func New(f images.HandlerFunc, logger func([]byte)) images.HandlerFunc {
|
||||
return func(ctx context.Context, desc ocispecs.Descriptor) ([]ocispecs.Descriptor, error) {
|
||||
backoff := time.Second
|
||||
@ -35,7 +39,7 @@ func New(f images.HandlerFunc, logger func([]byte)) images.HandlerFunc {
|
||||
return descs, nil
|
||||
}
|
||||
// backoff logic
|
||||
if backoff >= 8*time.Second {
|
||||
if backoff >= MaxRetryBackoff {
|
||||
return nil, err
|
||||
}
|
||||
if logger != nil {
|
||||
|
Reference in New Issue
Block a user