commit
d458fb3043
|
@ -150,11 +150,14 @@ func (cm *cacheManager) GetByBlob(ctx context.Context, desc ocispec.Descriptor,
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
||||||
if len(sis) > 0 {
|
for _, si := range sis {
|
||||||
ref, err := cm.get(ctx, sis[0].ID(), opts...)
|
ref, err := cm.get(ctx, si.ID(), opts...)
|
||||||
if err != nil && !IsNotFound(err) {
|
if err != nil && !IsNotFound(err) {
|
||||||
return nil, errors.Wrapf(err, "failed to get record %s by blobchainid", sis[0].ID())
|
return nil, errors.Wrapf(err, "failed to get record %s by blobchainid", sis[0].ID())
|
||||||
}
|
}
|
||||||
|
if ref == nil {
|
||||||
|
continue
|
||||||
|
}
|
||||||
if p != nil {
|
if p != nil {
|
||||||
releaseParent = true
|
releaseParent = true
|
||||||
}
|
}
|
||||||
|
@ -170,12 +173,15 @@ func (cm *cacheManager) GetByBlob(ctx context.Context, desc ocispec.Descriptor,
|
||||||
}
|
}
|
||||||
|
|
||||||
var link ImmutableRef
|
var link ImmutableRef
|
||||||
if len(sis) > 0 {
|
for _, si := range sis {
|
||||||
ref, err := cm.get(ctx, sis[0].ID(), opts...)
|
ref, err := cm.get(ctx, si.ID(), opts...)
|
||||||
if err != nil && !IsNotFound(err) {
|
if err != nil && !IsNotFound(err) {
|
||||||
return nil, errors.Wrapf(err, "failed to get record %s by chainid", sis[0].ID())
|
return nil, errors.Wrapf(err, "failed to get record %s by chainid", sis[0].ID())
|
||||||
}
|
}
|
||||||
|
if ref != nil {
|
||||||
link = ref
|
link = ref
|
||||||
|
break
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
id := identity.NewID()
|
id := identity.NewID()
|
||||||
|
|
Loading…
Reference in New Issue