From f2b0bd7eb4acba99109fc2ebb5f5dde7647ee71a Mon Sep 17 00:00:00 2001 From: ashmrtn <3891298+ashmrtn@users.noreply.github.com> Date: Wed, 13 Sep 2023 16:15:03 -0700 Subject: [PATCH] Fix repo maintenance command (#4240) If we continue passing UnknownService then the command fails when trying to initialize the graph client. Longer term we should rework the logic in the helper functions for connecting to a repo (see #4239) This issue isn't present in the most recent release --- #### Does this PR need a docs update or release note? - [ ] :white_check_mark: Yes, it's included - [ ] :clock1: Yes, but in a later PR - [x] :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) * #3217 #### Test Plan - [x] :muscle: Manual - [ ] :zap: Unit test - [ ] :green_heart: E2E --- src/cli/repo/repo.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/cli/repo/repo.go b/src/cli/repo/repo.go index 378cce16a..dddafa406 100644 --- a/src/cli/repo/repo.go +++ b/src/cli/repo/repo.go @@ -121,7 +121,12 @@ func handleMaintenanceCmd(cmd *cobra.Command, args []string) error { return err } - r, _, err := utils.AccountConnectAndWriteRepoConfig(ctx, path.UnknownService, S3Overrides(cmd)) + r, _, err := utils.AccountConnectAndWriteRepoConfig( + ctx, + // Need to give it a valid service so it won't error out on us even though + // we don't need the graph client. + path.OneDriveService, + S3Overrides(cmd)) if err != nil { return print.Only(ctx, err) }