vendor: update buildkit to master@31c870e82a48

Signed-off-by: Justin Chadwell <me@jedevc.com>
This commit is contained in:
Justin Chadwell
2023-05-15 18:32:31 +01:00
parent 167cd16acb
commit e61a8cf637
269 changed files with 25798 additions and 3371 deletions

View File

@ -15,6 +15,7 @@ import (
)
func Copy(ctx context.Context, ingester content.Ingester, provider content.Provider, desc ocispecs.Descriptor, ref string, logger func([]byte)) error {
ctx = RegisterContentPayloadTypes(ctx)
if _, err := retryhandler.New(limited.FetchHandler(ingester, &localFetcher{provider}, ref), logger)(ctx, desc); err != nil {
return err
}
@ -60,6 +61,7 @@ func (r *rc) Seek(offset int64, whence int) (int64, error) {
}
func CopyChain(ctx context.Context, ingester content.Ingester, provider content.Provider, desc ocispecs.Descriptor) error {
ctx = RegisterContentPayloadTypes(ctx)
var m sync.Mutex
manifestStack := []ocispecs.Descriptor{}

View File

@ -0,0 +1,15 @@
package contentutil
import (
"context"
"github.com/containerd/containerd/remotes"
intoto "github.com/in-toto/in-toto-golang/in_toto"
)
// RegisterContentPayloadTypes registers content types that are not defined by
// default but that we expect to find in registry images.
func RegisterContentPayloadTypes(ctx context.Context) context.Context {
ctx = remotes.WithMediaTypeKeyPrefix(ctx, intoto.PayloadType, "intoto")
return ctx
}