Disable export and restore for sharepoint lists (#4930)

<!-- PR description-->

We are hitting a sanity test failure during export. `Error: Failed to run SharePoint export: running export: exporting collections: transforming path to drive path: folder path doesn't match expected format for Drive items`. CI [run](https://github.com/alcionai/corso/actions/runs/7304614358/job/19907054349).

After debugging I found out that it's because we don't support exports for lists yet. This PR disables list export and restore.

We are also hitting a panic during list restore, so I am temporarily disabling list restores too. `Error: Failed to run SharePoint restore: panic recovery: file /Users/pandeyab/corso/src/pkg/services/m365/api/lists.go - line 607: runtime error: invalid memory address or nil pointer dereference`. 
Will request @HiteshRepo to investigate restore failure. 

---

#### 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
- [ ] 🐛 Bugfix
- [ ] 🗺️ Documentation
- [x] 🤖 Supportability/Tests
- [ ] 💻 CI/Deployment
- [ ] 🧹 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:
Abhishek Pandey 2023-12-22 17:52:25 -08:00 committed by GitHub
parent 1940d3a1f1
commit 341a838181
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 0 deletions

View File

@ -7,6 +7,7 @@ import (
"github.com/alcionai/corso/src/cli/flags" "github.com/alcionai/corso/src/cli/flags"
"github.com/alcionai/corso/src/cli/utils" "github.com/alcionai/corso/src/cli/utils"
"github.com/alcionai/corso/src/pkg/selectors"
) )
// called by export.go to map subcommands to provider-specific handling. // called by export.go to map subcommands to provider-specific handling.
@ -94,6 +95,9 @@ func exportSharePointCmd(cmd *cobra.Command, args []string) error {
sel := utils.IncludeSharePointRestoreDataSelectors(ctx, opts) sel := utils.IncludeSharePointRestoreDataSelectors(ctx, opts)
utils.FilterSharePointRestoreInfoSelectors(sel, opts) utils.FilterSharePointRestoreInfoSelectors(sel, opts)
// Exclude lists from exports since they are not supported yet.
sel.Exclude(sel.Lists(selectors.Any()))
return runExport( return runExport(
ctx, ctx,
cmd, cmd,

View File

@ -7,6 +7,7 @@ import (
"github.com/alcionai/corso/src/cli/flags" "github.com/alcionai/corso/src/cli/flags"
"github.com/alcionai/corso/src/cli/utils" "github.com/alcionai/corso/src/cli/utils"
"github.com/alcionai/corso/src/pkg/dttm" "github.com/alcionai/corso/src/pkg/dttm"
"github.com/alcionai/corso/src/pkg/selectors"
) )
// called by restore.go to map subcommands to provider-specific handling. // called by restore.go to map subcommands to provider-specific handling.
@ -94,6 +95,9 @@ func restoreSharePointCmd(cmd *cobra.Command, args []string) error {
sel := utils.IncludeSharePointRestoreDataSelectors(ctx, opts) sel := utils.IncludeSharePointRestoreDataSelectors(ctx, opts)
utils.FilterSharePointRestoreInfoSelectors(sel, opts) utils.FilterSharePointRestoreInfoSelectors(sel, opts)
// Exclude lists from restore since they are not supported yet.
sel.Exclude(sel.Lists(selectors.Any()))
return runRestore( return runRestore(
ctx, ctx,
cmd, cmd,