mirror of
https://github.com/mudler/luet.git
synced 2025-09-26 07:10:25 +00:00
bump github.com/moby/buildkit to v0.13.0 (#351)
* bump github.com/moby/buildkit to v0.13.0 Signed-off-by: Nianyu Shen <nianyu@spectrocloud.com> * fix: update dep usage based on newer version Signed-off-by: Nianyu Shen <nianyu@spectrocloud.com> * remove empty line Signed-off-by: Nianyu Shen <nianyu@spectrocloud.com> * ci: bump golang to 1.21.x * Bump moby * debug --------- Signed-off-by: Nianyu Shen <nianyu@spectrocloud.com> Co-authored-by: Nianyu Shen <nianyu@spectrocloud.com>
This commit is contained in:
committed by
GitHub
parent
c47bf4833a
commit
4c788ccbd1
19
vendor/github.com/google/go-containerregistry/internal/retry/retry.go
generated
vendored
19
vendor/github.com/google/go-containerregistry/internal/retry/retry.go
generated
vendored
@@ -18,6 +18,7 @@ package retry
|
||||
|
||||
import (
|
||||
"context"
|
||||
"errors"
|
||||
"fmt"
|
||||
|
||||
"github.com/google/go-containerregistry/internal/retry/wait"
|
||||
@@ -36,7 +37,7 @@ type temporary interface {
|
||||
|
||||
// IsTemporary returns true if err implements Temporary() and it returns true.
|
||||
func IsTemporary(err error) bool {
|
||||
if err == context.DeadlineExceeded {
|
||||
if errors.Is(err, context.DeadlineExceeded) {
|
||||
return false
|
||||
}
|
||||
if te, ok := err.(temporary); ok && te.Temporary() {
|
||||
@@ -75,3 +76,19 @@ func Retry(f func() error, p Predicate, backoff wait.Backoff) (err error) {
|
||||
wait.ExponentialBackoff(backoff, condition)
|
||||
return
|
||||
}
|
||||
|
||||
type contextKey string
|
||||
|
||||
var key = contextKey("never")
|
||||
|
||||
// Never returns a context that signals something should not be retried.
|
||||
// This is a hack and can be used to communicate across package boundaries
|
||||
// to avoid retry amplification.
|
||||
func Never(ctx context.Context) context.Context {
|
||||
return context.WithValue(ctx, key, true)
|
||||
}
|
||||
|
||||
// Ever returns true if the context was wrapped by Never.
|
||||
func Ever(ctx context.Context) bool {
|
||||
return ctx.Value(key) == nil
|
||||
}
|
||||
|
Reference in New Issue
Block a user