add missing recoverable errs (#4363)
groups collection item streaming is missing recoverable errors, and is only logging at this time. This may be causing backups to succeed even when errors should cause a failure. --- #### Does this PR need a docs update or release note? - [x] ⛔ No #### Type of change - [x] 🐛 Bugfix #### Issue(s) * #3988 #### Test Plan - [x] ⚡ Unit test - [x] 💚 E2E
This commit is contained in:
parent
a3dabaa589
commit
732bac17a4
@ -301,8 +301,11 @@ func (oc *Collection) getDriveItemContent(
|
|||||||
return nil, clues.Wrap(err, "max oneNote item").Label(graph.LabelsSkippable)
|
return nil, clues.Wrap(err, "max oneNote item").Label(graph.LabelsSkippable)
|
||||||
}
|
}
|
||||||
|
|
||||||
logger.CtxErr(ctx, err).Error("downloading item content")
|
errs.AddRecoverable(
|
||||||
errs.AddRecoverable(ctx, clues.Stack(err).WithClues(ctx).Label(fault.LabelForceNoBackupCreation))
|
ctx,
|
||||||
|
clues.Wrap(err, "downloading item content").
|
||||||
|
WithClues(ctx).
|
||||||
|
Label(fault.LabelForceNoBackupCreation))
|
||||||
|
|
||||||
// return err, not el.Err(), because the lazy reader needs to communicate to
|
// return err, not el.Err(), because the lazy reader needs to communicate to
|
||||||
// the data consumer that this item is unreadable, regardless of the fault state.
|
// the data consumer that this item is unreadable, regardless of the fault state.
|
||||||
|
|||||||
@ -244,11 +244,14 @@ func (col *prefetchCollection) streamItems(
|
|||||||
}(id)
|
}(id)
|
||||||
}
|
}
|
||||||
|
|
||||||
parentPath := col.LocationPath().String()
|
var (
|
||||||
|
parentPath = col.LocationPath().String()
|
||||||
|
el = errs.Local()
|
||||||
|
)
|
||||||
|
|
||||||
// add any new items
|
// add any new items
|
||||||
for id := range col.added {
|
for id := range col.added {
|
||||||
if errs.Failure() != nil {
|
if el.Failure() != nil {
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -276,7 +279,7 @@ func (col *prefetchCollection) streamItems(
|
|||||||
atomic.AddInt64(&success, 1)
|
atomic.AddInt64(&success, 1)
|
||||||
log.With("err", err).Infow("item not found", clues.InErr(err).Slice()...)
|
log.With("err", err).Infow("item not found", clues.InErr(err).Slice()...)
|
||||||
} else {
|
} else {
|
||||||
errs.AddRecoverable(ctx, clues.Wrap(err, "fetching item").Label(fault.LabelForceNoBackupCreation))
|
el.AddRecoverable(ctx, clues.Wrap(err, "fetching item").Label(fault.LabelForceNoBackupCreation))
|
||||||
}
|
}
|
||||||
|
|
||||||
return
|
return
|
||||||
|
|||||||
@ -212,18 +212,18 @@ func (col *Collection) streamItems(ctx context.Context, errs *fault.Bus) {
|
|||||||
parentFolderID,
|
parentFolderID,
|
||||||
id)
|
id)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
logger.CtxErr(ctx, err).Info("writing channel message to serializer")
|
el.AddRecoverable(ctx, clues.Wrap(err, "writing channel message to serializer"))
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
if err := writer.WriteObjectValue("", item); err != nil {
|
if err := writer.WriteObjectValue("", item); err != nil {
|
||||||
logger.CtxErr(ctx, err).Info("writing channel message to serializer")
|
el.AddRecoverable(ctx, clues.Wrap(err, "writing channel message to serializer"))
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
data, err := writer.GetSerializedContent()
|
data, err := writer.GetSerializedContent()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
logger.CtxErr(ctx, err).Info("serializing channel message")
|
el.AddRecoverable(ctx, clues.Wrap(err, "serializing channel message"))
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user