Skip duplicated layers. (#19624)

pull/19625/head^2
KN4CK3R 3 years ago committed by GitHub
parent 0483ee8f69
commit 4691e59828
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      routers/api/packages/container/manifest.go

@ -355,6 +355,10 @@ func createFileFromBlobReference(ctx context.Context, pv, uploadVersion *package
}
var err error
if pf, err = packages_model.TryInsertFile(ctx, pf); err != nil {
if err == packages_model.ErrDuplicatePackageFile {
// Skip this blob because the manifest contains the same filesystem layer multiple times.
return nil
}
log.Error("Error inserting package file: %v", err)
return err
}

Loading…
Cancel
Save