Skip to content
This repository has been archived by the owner on Oct 11, 2024. It is now read-only.

Commit

Permalink
Propagate options to repo and operations (#1932)
Browse files Browse the repository at this point in the history
## Description

Make sure the options struct is passed through the entire stack so we actually have access to flag values.

## 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

- [ ] 🌻 Feature
- [x] 🐛 Bugfix
- [ ] 🗺️ Documentation
- [ ] 🤖 Test
- [ ] 💻 CI/Deployment
- [x] 🐹 Trivial/Minor

## Issue(s)

* closes #1931 

## Test Plan

- [x] 💪 Manual
- [ ] ⚡ Unit test
- [ ] 💚 E2E
  • Loading branch information
ashmrtn authored Dec 23, 2022
1 parent 37f1a3e commit 91b9f2e
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
3 changes: 1 addition & 2 deletions src/cli/backup/exchange.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ import (
"github.com/alcionai/corso/src/internal/model"
"github.com/alcionai/corso/src/pkg/backup"
"github.com/alcionai/corso/src/pkg/backup/details"
"github.com/alcionai/corso/src/pkg/control"
"github.com/alcionai/corso/src/pkg/path"
"github.com/alcionai/corso/src/pkg/repository"
"github.com/alcionai/corso/src/pkg/selectors"
Expand Down Expand Up @@ -264,7 +263,7 @@ func createExchangeCmd(cmd *cobra.Command, args []string) error {
return Only(ctx, err)
}

r, err := repository.Connect(ctx, acct, s, control.Options{})
r, err := repository.Connect(ctx, acct, s, options.Control())
if err != nil {
return Only(ctx, errors.Wrapf(err, "Failed to connect to the %s repository", s.Provider))
}
Expand Down
2 changes: 1 addition & 1 deletion src/internal/connector/exchange/data_collections.go
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ func DataCollections(
acct,
scope,
dps,
control.Options{},
ctrlOpts,
su)
if err != nil {
user := scope.Get(selectors.ExchangeUser)
Expand Down
2 changes: 2 additions & 0 deletions src/pkg/repository/repository.go
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@ func Initialize(
Account: acct,
Storage: s,
Bus: bus,
Opts: opts,
dataLayer: w,
modelStore: ms,
}
Expand Down Expand Up @@ -192,6 +193,7 @@ func Connect(
Account: acct,
Storage: s,
Bus: bus,
Opts: opts,
dataLayer: w,
modelStore: ms,
}, nil
Expand Down

0 comments on commit 91b9f2e

Please sign in to comment.