don't flush store on each sync

Signed-off-by: Adam Martin <adam.martin@rancherfederal.com>
This commit is contained in:
Adam Martin
2023-11-30 10:02:04 -05:00
parent f348fb8d4d
commit f1fbd7e9c2
2 changed files with 2 additions and 7 deletions

View File

@@ -98,7 +98,8 @@ func storeImage(ctx context.Context, s *store.Layout, i v1alpha1.Image) error {
}
err = cosign.SaveImage(ctx, s, r.Name())
//desc, err := s.AddOCI(ctx, img, r.Name())
// sync with local index
s.CopyAll(ctx, s.OCI, nil)
if err != nil {
return err
}

View File

@@ -42,12 +42,6 @@ func (o *SyncOpts) AddFlags(cmd *cobra.Command) {
func SyncCmd(ctx context.Context, o *SyncOpts, s *store.Layout) error {
l := log.FromContext(ctx)
// Start from an empty store (contents are cached elsewhere)
l.Debugf("flushing content store")
if err := s.Flush(ctx); err != nil {
return err
}
// if passed products, check for a remote manifest to retrieve and use.
for _, product := range o.Products {
l.Infof("processing content file for product: '%s'", product)