vendor: bump buildkit to master

Signed-off-by: Justin Chadwell <me@jedevc.com>
This commit is contained in:
Justin Chadwell
2022-07-06 09:47:29 +01:00
parent 3cf549a7f7
commit 3b4780ef19
55 changed files with 844 additions and 181 deletions

View File

@ -23,7 +23,7 @@ var (
Package = "github.com/containerd/containerd"
// Version holds the complete version number. Filled in at linking time.
Version = "1.6.4+unknown"
Version = "1.6.6+unknown"
// Revision is filled with the VCS (e.g. git) revision being used to build
// the program at linking time.

View File

@ -34,8 +34,17 @@ type ImageMetaResolver interface {
ResolveImageConfig(ctx context.Context, ref string, opt ResolveImageConfigOpt) (digest.Digest, []byte, error)
}
type ResolverType int
const (
ResolverTypeRegistry ResolverType = iota
ResolverTypeOCILayout
)
type ResolveImageConfigOpt struct {
Platform *ocispecs.Platform
ResolveMode string
LogName string
Platform *ocispecs.Platform
ResolveMode string
LogName string
ResolverType // default is ResolverTypeRegistry
SessionID string
}

View File

@ -4,6 +4,7 @@ import (
"context"
_ "crypto/sha256" // for opencontainers/go-digest
"encoding/json"
"fmt"
"os"
"strconv"
"strings"
@ -132,8 +133,9 @@ func Image(ref string, opts ...ImageOption) State {
p = c.Platform
}
_, dt, err := info.metaResolver.ResolveImageConfig(ctx, ref, ResolveImageConfigOpt{
Platform: p,
ResolveMode: info.resolveMode.String(),
Platform: p,
ResolveMode: info.resolveMode.String(),
ResolverType: ResolverTypeRegistry,
})
if err != nil {
return State{}, err
@ -147,8 +149,9 @@ func Image(ref string, opts ...ImageOption) State {
p = c.Platform
}
dgst, dt, err := info.metaResolver.ResolveImageConfig(context.TODO(), ref, ResolveImageConfigOpt{
Platform: p,
ResolveMode: info.resolveMode.String(),
Platform: p,
ResolveMode: info.resolveMode.String(),
ResolverType: ResolverTypeRegistry,
})
if err != nil {
return State{}, err
@ -452,6 +455,57 @@ func Differ(t DiffType, required bool) LocalOption {
})
}
func OCILayout(contentStoreID string, dig digest.Digest, opts ...OCILayoutOption) State {
gi := &OCILayoutInfo{}
for _, o := range opts {
o.SetOCILayoutOption(gi)
}
attrs := map[string]string{}
if gi.sessionID != "" {
attrs[pb.AttrOCILayoutSessionID] = gi.sessionID
addCap(&gi.Constraints, pb.CapSourceOCILayoutSessionID)
}
if ll := gi.layerLimit; ll != nil {
attrs[pb.AttrOCILayoutLayerLimit] = strconv.FormatInt(int64(*ll), 10)
addCap(&gi.Constraints, pb.CapSourceOCILayoutLayerLimit)
}
addCap(&gi.Constraints, pb.CapSourceOCILayout)
source := NewSource(fmt.Sprintf("oci-layout://%s@%s", contentStoreID, dig), attrs, gi.Constraints)
return NewState(source.Output())
}
type OCILayoutOption interface {
SetOCILayoutOption(*OCILayoutInfo)
}
type ociLayoutOptionFunc func(*OCILayoutInfo)
func (fn ociLayoutOptionFunc) SetOCILayoutOption(li *OCILayoutInfo) {
fn(li)
}
func OCISessionID(id string) OCILayoutOption {
return ociLayoutOptionFunc(func(oi *OCILayoutInfo) {
oi.sessionID = id
})
}
func OCILayerLimit(limit int) OCILayoutOption {
return ociLayoutOptionFunc(func(oi *OCILayoutInfo) {
oi.layerLimit = &limit
})
}
type OCILayoutInfo struct {
constraintsWrapper
sessionID string
layerLimit *int
}
type DiffType string
const (

View File

@ -455,6 +455,7 @@ type ConstraintsOpt interface {
HTTPOption
ImageOption
GitOption
OCILayoutOption
}
type constraintsOptFunc func(m *Constraints)
@ -471,6 +472,10 @@ func (fn constraintsOptFunc) SetLocalOption(li *LocalInfo) {
li.applyConstraints(fn)
}
func (fn constraintsOptFunc) SetOCILayoutOption(oi *OCILayoutInfo) {
oi.applyConstraints(fn)
}
func (fn constraintsOptFunc) SetHTTPOption(hi *HTTPInfo) {
hi.applyConstraints(fn)
}

View File

@ -33,6 +33,7 @@ import (
type SolveOpt struct {
Exports []ExportEntry
LocalDirs map[string]string
OCIStores map[string]content.Store
SharedKey string
Frontend string
FrontendAttrs map[string]string
@ -158,8 +159,27 @@ func (c *Client) solve(ctx context.Context, def *llb.Definition, runGateway runG
}
}
if len(cacheOpt.contentStores) > 0 {
s.Allow(sessioncontent.NewAttachable(cacheOpt.contentStores))
// this is a new map that contains both cacheOpt stores and OCILayout stores
contentStores := make(map[string]content.Store, len(cacheOpt.contentStores)+len(opt.OCIStores))
// copy over the stores references from cacheOpt
for key, store := range cacheOpt.contentStores {
contentStores[key] = store
}
// copy over the stores references from ociLayout opts
for key, store := range opt.OCIStores {
// conflicts are not allowed
if _, ok := contentStores[key]; ok {
// we probably should check if the store is identical, but given that
// https://pkg.go.dev/github.com/containerd/containerd/content#Store
// is just an interface, composing 4 others, that is rather hard to do.
// For a future iteration.
return nil, errors.Errorf("contentStore key %s exists in both cache and OCI layouts", key)
}
contentStores[key] = store
}
if len(contentStores) > 0 {
s.Allow(sessioncontent.NewAttachable(contentStores))
}
eg.Go(func() error {

View File

@ -0,0 +1,115 @@
package exptypes
import (
"fmt"
"regexp"
"github.com/containerd/containerd/platforms"
ocispecs "github.com/opencontainers/image-spec/specs-go/v1"
"github.com/pkg/errors"
)
const (
AnnotationIndex = "index"
AnnotationIndexDescriptor = "index-descriptor"
AnnotationManifest = "manifest"
AnnotationManifestDescriptor = "manifest-descriptor"
)
var (
keyAnnotationRegexp = regexp.MustCompile(`^annotation(?:-([a-z-]+))?(?:\[([A-Za-z0-9_/-]+)\])?\.(\S+)$`)
)
type AnnotationKey struct {
Type string
Platform *ocispecs.Platform
Key string
}
func (k AnnotationKey) String() string {
prefix := "annotation"
switch k.Type {
case "":
case AnnotationManifest, AnnotationManifestDescriptor:
prefix += fmt.Sprintf("-%s", k.Type)
if p := k.PlatformString(); p != "" {
prefix += fmt.Sprintf("[%s]", p)
}
case AnnotationIndex, AnnotationIndexDescriptor:
prefix += "-" + k.Type
default:
panic("unknown annotation type")
}
return fmt.Sprintf("%s.%s", prefix, k.Key)
}
func (k AnnotationKey) PlatformString() string {
if k.Platform == nil {
return ""
}
return platforms.Format(*k.Platform)
}
func AnnotationIndexKey(key string) string {
return AnnotationKey{
Type: AnnotationIndex,
Key: key,
}.String()
}
func AnnotationIndexDescriptorKey(key string) string {
return AnnotationKey{
Type: AnnotationIndexDescriptor,
Key: key,
}.String()
}
func AnnotationManifestKey(p *ocispecs.Platform, key string) string {
return AnnotationKey{
Type: AnnotationManifest,
Platform: p,
Key: key,
}.String()
}
func AnnotationManifestDescriptorKey(p *ocispecs.Platform, key string) string {
return AnnotationKey{
Type: AnnotationManifestDescriptor,
Platform: p,
Key: key,
}.String()
}
func ParseAnnotationKey(result string) (AnnotationKey, bool, error) {
groups := keyAnnotationRegexp.FindStringSubmatch(result)
if groups == nil {
return AnnotationKey{}, false, nil
}
tp, platform, key := groups[1], groups[2], groups[3]
switch tp {
case AnnotationIndex, AnnotationIndexDescriptor, AnnotationManifest, AnnotationManifestDescriptor:
case "":
tp = AnnotationManifest
default:
return AnnotationKey{}, true, errors.Errorf("unrecognized annotation type %s", tp)
}
var ociPlatform *ocispecs.Platform
if platform != "" {
p, err := platforms.Parse(platform)
if err != nil {
return AnnotationKey{}, true, err
}
ociPlatform = &p
}
annotation := AnnotationKey{
Type: tp,
Platform: ociPlatform,
Key: key,
}
return annotation, true, nil
}

View File

@ -459,7 +459,7 @@ func (c *grpcClient) ResolveImageConfig(ctx context.Context, ref string, opt llb
OSFeatures: platform.OSFeatures,
}
}
resp, err := c.client.ResolveImageConfig(ctx, &pb.ResolveImageConfigRequest{Ref: ref, Platform: p, ResolveMode: opt.ResolveMode, LogName: opt.LogName})
resp, err := c.client.ResolveImageConfig(ctx, &pb.ResolveImageConfigRequest{Ref: ref, Platform: p, ResolveMode: opt.ResolveMode, LogName: opt.LogName, ResolverType: int32(opt.ResolverType), SessionID: opt.SessionID})
if err != nil {
return "", nil, err
}

View File

@ -489,6 +489,8 @@ type ResolveImageConfigRequest struct {
Platform *pb.Platform `protobuf:"bytes,2,opt,name=Platform,proto3" json:"Platform,omitempty"`
ResolveMode string `protobuf:"bytes,3,opt,name=ResolveMode,proto3" json:"ResolveMode,omitempty"`
LogName string `protobuf:"bytes,4,opt,name=LogName,proto3" json:"LogName,omitempty"`
ResolverType int32 `protobuf:"varint,5,opt,name=ResolverType,proto3" json:"ResolverType,omitempty"`
SessionID string `protobuf:"bytes,6,opt,name=SessionID,proto3" json:"SessionID,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
@ -555,6 +557,20 @@ func (m *ResolveImageConfigRequest) GetLogName() string {
return ""
}
func (m *ResolveImageConfigRequest) GetResolverType() int32 {
if m != nil {
return m.ResolverType
}
return 0
}
func (m *ResolveImageConfigRequest) GetSessionID() string {
if m != nil {
return m.SessionID
}
return ""
}
type ResolveImageConfigResponse struct {
Digest github_com_opencontainers_go_digest.Digest `protobuf:"bytes,1,opt,name=Digest,proto3,customtype=github.com/opencontainers/go-digest.Digest" json:"Digest"`
Config []byte `protobuf:"bytes,2,opt,name=Config,proto3" json:"Config,omitempty"`
@ -2248,136 +2264,138 @@ func init() {
func init() { proto.RegisterFile("gateway.proto", fileDescriptor_f1a937782ebbded5) }
var fileDescriptor_f1a937782ebbded5 = []byte{
// 2060 bytes of a gzipped FileDescriptorProto
// 2086 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x58, 0xcd, 0x6f, 0xe3, 0xc6,
0x15, 0x37, 0x2d, 0xd9, 0x92, 0x9e, 0x3e, 0xd6, 0x99, 0xa4, 0x29, 0x43, 0x04, 0x1b, 0x87, 0x4d,
0x5d, 0xed, 0xc6, 0xa1, 0x52, 0x6f, 0x02, 0x6f, 0xbd, 0x45, 0xd2, 0xf5, 0x17, 0xec, 0xc4, 0xf6,
0xba, 0xe3, 0x14, 0x0b, 0x04, 0x29, 0x50, 0x5a, 0x1c, 0x69, 0x89, 0xa5, 0x39, 0xec, 0x70, 0xb4,
0x5e, 0x27, 0x97, 0xf6, 0xd6, 0x63, 0x81, 0x02, 0xbd, 0x16, 0xe8, 0x5f, 0xd0,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 0xd8, 0x44, 0xee, 0xcd, 0xc1, 0x8d, 0x07, 0x38, 0xeb, 0xfe,
0x22, 0xac, 0x63, 0x33, 0xd2, 0xf1, 0x28, 0xd7, 0x8c, 0xa9, 0xe1, 0x2b, 0xd7, 0x8c, 0x1b, 0xf3,
0xd6, 0x53, 0x28, 0xe2, 0x1c, 0x45, 0xf2, 0xea, 0x49, 0x66, 0xd0, 0xb2, 0xf2, 0xc2, 0x35, 0x31,
0x80, 0xfd, 0x1a, 0xeb, 0xae, 0x7c, 0x8b, 0xe6, 0x57, 0xdc, 0xcc, 0x1f, 0x48, 0xd6, 0xbd, 0x05,
0x38, 0xc7, 0xe2, 0xf5, 0x3b, 0xae, 0xbd, 0xc0, 0xbf, 0x38, 0xf3, 0xc5, 0x4f, 0xfd, 0x5f, 0x14,
0x41, 0x23, 0xdb, 0x4e, 0x89, 0x93, 0x03, 0x9d, 0x31, 0x89, 0x58, 0x9d, 0x85, 0xf9, 0xf5, 0x81,
0xdf, 0xe0, 0x9b, 0x60, 0xb2, 0xd5, 0x92, 0xad, 0x5c, 0x77, 0xcc, 0x6c, 0xea, 0xd6, 0x83, 0xa5,
0x30, 0xfa, 0x70, 0x57, 0xb5, 0x72, 0xdd, 0xae, 0x49, 0x7e, 0x67, 0x1a, 0xb5, 0x7c, 0x6b, 0x41,
0xbe, 0xb6, 0xf1, 0xa1, 0x81, 0x79, 0x86, 0x23, 0x5c, 0xae, 0xec, 0xcc, 0x6c, 0x9b, 0x9b, 0x67,
0xd9, 0x59, 0x70, 0xb7, 0xf1, 0xed, 0xab, 0xbb, 0xc6, 0x3f, 0x5e, 0xdd, 0x35, 0xfe, 0xf3, 0xea,
0xae, 0x71, 0x51, 0x96, 0x7f, 0xce, 0x3f, 0xf8, 0x7f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x29, 0xd9,
0x1c, 0x06, 0xee, 0x18, 0x00, 0x00,
}
// Reference imports to suppress errors if they are not otherwise used.
@ -3364,6 +3382,18 @@ func (m *ResolveImageConfigRequest) MarshalToSizedBuffer(dAtA []byte) (int, erro
i -= len(m.XXX_unrecognized)
copy(dAtA[i:], m.XXX_unrecognized)
}
if len(m.SessionID) > 0 {
i -= len(m.SessionID)
copy(dAtA[i:], m.SessionID)
i = encodeVarintGateway(dAtA, i, uint64(len(m.SessionID)))
i--
dAtA[i] = 0x32
}
if m.ResolverType != 0 {
i = encodeVarintGateway(dAtA, i, uint64(m.ResolverType))
i--
dAtA[i] = 0x28
}
if len(m.LogName) > 0 {
i -= len(m.LogName)
copy(dAtA[i:], m.LogName)
@ -5102,6 +5132,13 @@ func (m *ResolveImageConfigRequest) Size() (n int) {
if l > 0 {
n += 1 + l + sovGateway(uint64(l))
}
if m.ResolverType != 0 {
n += 1 + sovGateway(uint64(m.ResolverType))
}
l = len(m.SessionID)
if l > 0 {
n += 1 + l + sovGateway(uint64(l))
}
if m.XXX_unrecognized != nil {
n += len(m.XXX_unrecognized)
}
@ -7147,6 +7184,57 @@ func (m *ResolveImageConfigRequest) Unmarshal(dAtA []byte) error {
}
m.LogName = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 5:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field ResolverType", wireType)
}
m.ResolverType = 0
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowGateway
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
m.ResolverType |= int32(b&0x7F) << shift
if b < 0x80 {
break
}
}
case 6:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field SessionID", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowGateway
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
intStringLen := int(stringLen)
if intStringLen < 0 {
return ErrInvalidLengthGateway
}
postIndex := iNdEx + intStringLen
if postIndex < 0 {
return ErrInvalidLengthGateway
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.SessionID = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
default:
iNdEx = preIndex
skippy, err := skipGateway(dAtA[iNdEx:])

View File

@ -83,6 +83,8 @@ message ResolveImageConfigRequest {
pb.Platform Platform = 2;
string ResolveMode = 3;
string LogName = 4;
int32 ResolverType = 5;
string SessionID = 6;
}
message ResolveImageConfigResponse {

View File

@ -6,7 +6,6 @@ import (
"crypto/hmac"
"crypto/sha256"
"fmt"
"io"
"net/http"
"os"
"strconv"
@ -18,6 +17,7 @@ import (
remoteserrors "github.com/containerd/containerd/remotes/errors"
"github.com/docker/cli/cli/config"
"github.com/docker/cli/cli/config/configfile"
"github.com/docker/cli/cli/config/types"
"github.com/moby/buildkit/session"
"github.com/moby/buildkit/session/auth"
"github.com/moby/buildkit/util/progress/progresswriter"
@ -30,19 +30,21 @@ import (
const defaultExpiration = 60
func NewDockerAuthProvider(stderr io.Writer) session.Attachable {
func NewDockerAuthProvider(cfg *configfile.ConfigFile) session.Attachable {
return &authProvider{
config: config.LoadDefaultConfigFile(stderr),
seeds: &tokenSeeds{dir: config.Dir()},
loggerCache: map[string]struct{}{},
authConfigCache: map[string]*types.AuthConfig{},
config: cfg,
seeds: &tokenSeeds{dir: config.Dir()},
loggerCache: map[string]struct{}{},
}
}
type authProvider struct {
config *configfile.ConfigFile
seeds *tokenSeeds
logger progresswriter.Logger
loggerCache map[string]struct{}
authConfigCache map[string]*types.AuthConfig
config *configfile.ConfigFile
seeds *tokenSeeds
logger progresswriter.Logger
loggerCache map[string]struct{}
// The need for this mutex is not well understood.
// Without it, the docker cli on OS X hangs when
@ -62,6 +64,16 @@ func (ap *authProvider) Register(server *grpc.Server) {
}
func (ap *authProvider) FetchToken(ctx context.Context, req *auth.FetchTokenRequest) (rr *auth.FetchTokenResponse, err error) {
ac, err := ap.getAuthConfig(req.Host)
if err != nil {
return nil, err
}
// check for statically configured bearer token
if ac.RegistryToken != "" {
return toTokenResponse(ac.RegistryToken, time.Time{}, 0), nil
}
creds, err := ap.credentials(req.Host)
if err != nil {
return nil, err
@ -117,12 +129,7 @@ func (ap *authProvider) FetchToken(ctx context.Context, req *auth.FetchTokenRequ
}
func (ap *authProvider) credentials(host string) (*auth.CredentialsResponse, error) {
ap.mu.Lock()
defer ap.mu.Unlock()
if host == "registry-1.docker.io" {
host = "https://index.docker.io/v1/"
}
ac, err := ap.config.GetAuthConfig(host)
ac, err := ap.getAuthConfig(host)
if err != nil {
return nil, err
}
@ -173,6 +180,23 @@ func (ap *authProvider) VerifyTokenAuthority(ctx context.Context, req *auth.Veri
return &auth.VerifyTokenAuthorityResponse{Signed: sign.Sign(nil, req.Payload, priv)}, nil
}
func (ap *authProvider) getAuthConfig(host string) (*types.AuthConfig, error) {
ap.mu.Lock()
defer ap.mu.Unlock()
if _, exists := ap.authConfigCache[host]; !exists {
if host == "registry-1.docker.io" {
host = "https://index.docker.io/v1/"
}
ac, err := ap.config.GetAuthConfig(host)
if err != nil {
return nil, err
}
ap.authConfigCache[host] = &ac
}
return ap.authConfigCache[host], nil
}
func (ap *authProvider) getAuthorityKey(host string, salt []byte) (ed25519.PrivateKey, error) {
if v, err := strconv.ParseBool(os.Getenv("BUILDKIT_NO_CLIENT_TOKEN")); err == nil && v {
return nil, status.Errorf(codes.Unavailable, "client side tokens disabled")

View File

@ -28,6 +28,9 @@ const AttrImageResolveModePreferLocal = "local"
const AttrImageRecordType = "image.recordtype"
const AttrImageLayerLimit = "image.layerlimit"
const AttrOCILayoutSessionID = "oci.session"
const AttrOCILayoutLayerLimit = "oci.layerlimit"
const AttrLocalDiffer = "local.differ"
const AttrLocalDifferNone = "none"
const AttrLocalDifferMetadata = "metadata"

View File

@ -35,6 +35,10 @@ const (
CapSourceHTTPPerm apicaps.CapID = "source.http.perm"
CapSourceHTTPUIDGID apicaps.CapID = "soruce.http.uidgid"
CapSourceOCILayout apicaps.CapID = "source.ocilayout"
CapSourceOCILayoutSessionID apicaps.CapID = "source.ocilayout.sessionid"
CapSourceOCILayoutLayerLimit apicaps.CapID = "source.ocilayout.layerlimit"
CapBuildOpLLBFileName apicaps.CapID = "source.buildop.llbfilename"
CapExecMetaBase apicaps.CapID = "exec.meta.base"
@ -70,9 +74,12 @@ const (
CapMetaExportCache apicaps.CapID = "meta.exportcache"
CapRemoteCacheGHA apicaps.CapID = "cache.gha"
CapRemoteCacheS3 apicaps.CapID = "cache.s3"
CapMergeOp apicaps.CapID = "mergeop"
CapDiffOp apicaps.CapID = "diffop"
CapAnnotations apicaps.CapID = "exporter.image.annotations"
)
func init() {
@ -202,6 +209,24 @@ func init() {
Status: apicaps.CapStatusExperimental,
})
Caps.Init(apicaps.Cap{
ID: CapSourceOCILayout,
Enabled: true,
Status: apicaps.CapStatusExperimental,
})
Caps.Init(apicaps.Cap{
ID: CapSourceOCILayoutSessionID,
Enabled: true,
Status: apicaps.CapStatusExperimental,
})
Caps.Init(apicaps.Cap{
ID: CapSourceOCILayoutLayerLimit,
Enabled: true,
Status: apicaps.CapStatusExperimental,
})
Caps.Init(apicaps.Cap{
ID: CapSourceHTTPUIDGID,
Enabled: true,
@ -391,14 +416,28 @@ func init() {
Enabled: true,
Status: apicaps.CapStatusExperimental,
})
Caps.Init(apicaps.Cap{
ID: CapRemoteCacheS3,
Enabled: true,
Status: apicaps.CapStatusExperimental,
})
Caps.Init(apicaps.Cap{
ID: CapMergeOp,
Enabled: true,
Status: apicaps.CapStatusExperimental,
})
Caps.Init(apicaps.Cap{
ID: CapDiffOp,
Enabled: true,
Status: apicaps.CapStatusExperimental,
})
Caps.Init(apicaps.Cap{
ID: CapAnnotations,
Enabled: true,
Status: apicaps.CapStatusExperimental,
})
}

View File

@ -6,4 +6,5 @@ const (
LocalScheme = "local"
HTTPScheme = "http"
HTTPSScheme = "https"
OCIScheme = "oci-layout"
)

View File

@ -3,6 +3,7 @@ package contentutil
import (
"context"
"io"
"strings"
"sync"
"github.com/containerd/containerd/content"
@ -75,7 +76,7 @@ func CopyChain(ctx context.Context, ingester content.Ingester, provider content.
}
})
handlers := []images.Handler{
images.ChildrenHandler(provider),
annotateDistributionSourceHandler(images.ChildrenHandler(provider), desc.Annotations),
filterHandler,
retryhandler.New(limited.FetchHandler(ingester, &localFetcher{provider}, ""), func(_ []byte) {}),
}
@ -92,3 +93,45 @@ func CopyChain(ctx context.Context, ingester content.Ingester, provider content.
return nil
}
func annotateDistributionSourceHandler(f images.HandlerFunc, basis map[string]string) images.HandlerFunc {
return func(ctx context.Context, desc ocispecs.Descriptor) ([]ocispecs.Descriptor, error) {
children, err := f(ctx, desc)
if err != nil {
return nil, err
}
// only add distribution source for the config or blob data descriptor
switch desc.MediaType {
case images.MediaTypeDockerSchema2Manifest, ocispecs.MediaTypeImageManifest,
images.MediaTypeDockerSchema2ManifestList, ocispecs.MediaTypeImageIndex:
default:
return children, nil
}
for i := range children {
child := children[i]
for k, v := range basis {
if !strings.HasPrefix(k, "containerd.io/distribution.source.") {
continue
}
if child.Annotations != nil {
if _, ok := child.Annotations[k]; ok {
// don't override if already present
continue
}
}
if child.Annotations == nil {
child.Annotations = map[string]string{}
}
child.Annotations[k] = v
}
children[i] = child
}
return children, nil
}
}