Pruning method logs nonsensical configuration values (#301)

* Pruning method logs nonsensical configuration values

* Adjust test assertion about log output
This commit is contained in:
Frederik Ring
2023-11-04 12:19:44 +01:00
committed by GitHub
parent d3e1d1531b
commit 0325889ac4
9 changed files with 38 additions and 46 deletions

View File

@@ -127,12 +127,12 @@ func (b *azureBlobStorage) Prune(deadline time.Time, pruningPrefix string) (*sto
}
}
stats := storage.PruneStats{
stats := &storage.PruneStats{
Total: totalCount,
Pruned: uint(len(matches)),
}
if err := b.DoPrune(b.Name(), len(matches), int(totalCount), func() error {
pruneErr := b.DoPrune(b.Name(), len(matches), int(totalCount), deadline, func() error {
wg := sync.WaitGroup{}
wg.Add(len(matches))
var errs []error
@@ -152,9 +152,7 @@ func (b *azureBlobStorage) Prune(deadline time.Time, pruningPrefix string) (*sto
return errors.Join(errs...)
}
return nil
}); err != nil {
return &stats, err
}
})
return &stats, nil
return stats, pruneErr
}