log all recoverable errors in backup/restore (#2598)
## Description fault is aggregating recoverable errors, but no code currently reports them. This is a quick hack to add logging around those errors. In the future, we'll want to refine who and where performs this report. ## Does this PR need a docs update or release note? - [x] ⛔ No ## Type of change - [x] 🧹 Tech Debt/Cleanup ## Issue(s) * #1970 ## Test Plan - [x] 💪 Manual
This commit is contained in:
parent
d7c0f61105
commit
a88b984b9a
@ -169,6 +169,15 @@ func (op *BackupOperation) Run(ctx context.Context) (err error) {
|
||||
opStats.readErr = op.Errors.Err()
|
||||
}
|
||||
|
||||
// TODO: the consumer (sdk or cli) should run this, not operations.
|
||||
recoverableCount := len(op.Errors.Errs())
|
||||
for i, err := range op.Errors.Errs() {
|
||||
logger.Ctx(ctx).
|
||||
With("error", err).
|
||||
With(clues.InErr(err).Slice()...).
|
||||
Errorf("doing backup: recoverable error %d of %d", i+1, recoverableCount)
|
||||
}
|
||||
|
||||
// -----
|
||||
// Persistence
|
||||
// -----
|
||||
|
||||
@ -156,6 +156,15 @@ func (op *RestoreOperation) Run(ctx context.Context) (restoreDetails *details.De
|
||||
opStats.readErr = op.Errors.Err()
|
||||
}
|
||||
|
||||
// TODO: the consumer (sdk or cli) should run this, not operations.
|
||||
recoverableCount := len(op.Errors.Errs())
|
||||
for i, err := range op.Errors.Errs() {
|
||||
logger.Ctx(ctx).
|
||||
With("error", err).
|
||||
With(clues.InErr(err).Slice()...).
|
||||
Errorf("doing restore: recoverable error %d of %d", i+1, recoverableCount)
|
||||
}
|
||||
|
||||
// -----
|
||||
// Persistence
|
||||
// -----
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user