From 02db885c1ee7039edf19bc16c7935173983d4e23 Mon Sep 17 00:00:00 2001 From: Vaibhav Kamra Date: Wed, 4 Oct 2023 22:19:30 -0700 Subject: [PATCH] Temporary removal of OneNote file size check (#4437) Temporarily remove the large file size check that controls skipping a OneNote file download that failed with a 503 error. We've observed this error condition to be persistent even with smaller OneNote files. This allows us to unblock backup for these resources while we investigate the issue. --- #### Does this PR need a docs update or release note? - [x] :white_check_mark: Yes, it's included - [ ] :clock1: Yes, but in a later PR - [ ] :no_entry: No #### Type of change - [ ] :sunflower: Feature - [x] :bug: Bugfix - [ ] :world_map: Documentation - [ ] :robot: Supportability/Tests - [ ] :computer: CI/Deployment - [ ] :broom: Tech Debt/Cleanup #### Issue(s) * # #### Test Plan - [x] :muscle: Manual - [ ] :zap: Unit test - [ ] :green_heart: E2E --- src/internal/m365/collection/drive/collection.go | 5 ++++- src/internal/m365/collection/drive/collection_test.go | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/internal/m365/collection/drive/collection.go b/src/internal/m365/collection/drive/collection.go index 423c43930..b29cb98be 100644 --- a/src/internal/m365/collection/drive/collection.go +++ b/src/internal/m365/collection/drive/collection.go @@ -265,7 +265,10 @@ func (oc *Collection) getDriveItemContent( // Skip big OneNote files as they can't be downloaded if clues.HasLabel(err, graph.LabelStatus(http.StatusServiceUnavailable)) && - oc.scope == CollectionScopePackage && *item.GetSize() >= MaxOneNoteFileSize { + // TODO: We've removed the file size check because it looks like we've seen persistent + // 503's with smaller OneNote files also. + // oc.scope == CollectionScopePackage && *item.GetSize() >= MaxOneNoteFileSize { + oc.scope == CollectionScopePackage { // FIXME: It is possible that in case of a OneNote file we // will end up just backing up the `onetoc2` file without // the one file which is the important part of the OneNote diff --git a/src/internal/m365/collection/drive/collection_test.go b/src/internal/m365/collection/drive/collection_test.go index 2e2f85160..9ced071f9 100644 --- a/src/internal/m365/collection/drive/collection_test.go +++ b/src/internal/m365/collection/drive/collection_test.go @@ -565,7 +565,7 @@ func (suite *GetDriveItemUnitTestSuite) TestGetDriveItem_error() { colScope: CollectionScopePackage, itemSize: 10, err: clues.New("small onenote error").Label(graph.LabelStatus(http.StatusServiceUnavailable)), - labels: []string{graph.LabelStatus(http.StatusServiceUnavailable)}, + labels: []string{graph.LabelStatus(http.StatusServiceUnavailable), graph.LabelsSkippable}, }, { name: "big OneNote file",