Remove a few more failing points

This commit is contained in:
Abhishek Pandey 2023-07-21 00:27:26 -07:00
parent d64b8844a5
commit 748ff803d1

View File

@ -235,24 +235,24 @@ func (op *BackupOperation) Run(ctx context.Context) (err error) {
// ----- // -----
err = op.persistResults(startTime, &opStats) err = op.persistResults(startTime, &opStats)
if err != nil { if err != nil && (deets == nil || deets.Empty()) {
op.Errors.Fail(clues.Wrap(err, "persisting backup results")) op.Errors.Fail(clues.Wrap(err, "persisting backup results"))
return op.Errors.Failure() return op.Errors.Failure()
} }
// force exit without backup in certain cases. // force exit without backup in certain cases.
// see: https://github.com/alcionai/corso/pull/2510#discussion_r1113532530 // see: https://github.com/alcionai/corso/pull/2510#discussion_r1113532530
for _, e := range op.Errors.Recovered() { // for _, e := range op.Errors.Recovered() {
if clues.HasLabel(e, fault.LabelForceNoBackupCreation) { // if clues.HasLabel(e, fault.LabelForceNoBackupCreation) {
logger.Ctx(ctx). // logger.Ctx(ctx).
With("error", e). // With("error", e).
With(clues.InErr(err).Slice()...). // With(clues.InErr(err).Slice()...).
Infow("completed backup; conditional error forcing exit without model persistence", // Infow("completed backup; conditional error forcing exit without model persistence",
"results", op.Results) // "results", op.Results)
return op.Errors.Fail(clues.Wrap(e, "forced backup")).Failure() // return op.Errors.Fail(clues.Wrap(e, "forced backup")).Failure()
} // }
} // }
err = op.createBackupModels( err = op.createBackupModels(
ctx, ctx,