Log item information when we are not able to download an item (#2659)
This will help us pin point the file which caused issues and can be used to debug the specific file. <!-- Insert PR description--> --- #### Does this PR need a docs update or release note? - [ ] ✅ Yes, it's included - [ ] 🕐 Yes, but in a later PR - [x] ⛔ No #### Type of change <!--- Please check the type of change your PR introduces: ---> - [ ] 🌻 Feature - [x] 🐛 Bugfix - [ ] 🗺️ Documentation - [ ] 🤖 Test - [ ] 💻 CI/Deployment - [x] 🧹 Tech Debt/Cleanup #### Issue(s) <!-- Can reference multiple issues. Use one of the following "magic words" - "closes, fixes" to auto-close the Github issue. --> * #<issue> #### Test Plan <!-- How will this be tested prior to merging.--> - [x] 💪 Manual - [ ] ⚡ Unit test - [ ] 💚 E2E
This commit is contained in:
parent
a384d0c036
commit
fe1f6ae5fb
@ -296,10 +296,10 @@ func (oc *Collection) populateItems(ctx context.Context, errs *fault.Bus) {
|
||||
)
|
||||
|
||||
ctx = clues.Add(ctx,
|
||||
"restore_item_id", itemID,
|
||||
"restore_item_name", itemName,
|
||||
"restore_item_size", itemSize,
|
||||
"restore_item_info", itemInfo)
|
||||
"backup_item_id", itemID,
|
||||
"backup_item_name", itemName,
|
||||
"backup_item_size", itemSize,
|
||||
)
|
||||
|
||||
isFile := item.GetFile() != nil
|
||||
|
||||
@ -337,6 +337,8 @@ func (oc *Collection) populateItems(ctx context.Context, errs *fault.Bus) {
|
||||
itemInfo.OneDrive.ParentPath = parentPathString
|
||||
}
|
||||
|
||||
ctx = clues.Add(ctx, "backup_item_info", itemInfo)
|
||||
|
||||
if isFile {
|
||||
dataSuffix := ""
|
||||
if oc.source == OneDriveSource {
|
||||
@ -370,6 +372,7 @@ func (oc *Collection) populateItems(ctx context.Context, errs *fault.Bus) {
|
||||
|
||||
// check for errors following retries
|
||||
if err != nil {
|
||||
logger.Ctx(ctx).With("error", err.Error()).Error("downloading item")
|
||||
el.AddRecoverable(clues.Stack(err).WithClues(ctx).Label(fault.LabelForceNoBackupCreation))
|
||||
return nil, err
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user