Skip to content

Commit

Permalink
fix: pass nil leadership ensurer for secrets migrations
Browse files Browse the repository at this point in the history
  • Loading branch information
manadart committed Dec 6, 2024
1 parent 00a7aba commit 8650812
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
3 changes: 1 addition & 2 deletions domain/secret/modelmigration/export.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,10 @@ func (e *exportOperation) Name() string {
}

func (e *exportOperation) Setup(scope modelmigration.Scope) error {
// We must not use a watcher during migration, so it's safe to pass a
// nil watcher factory.
e.service = service.NewSecretService(
state.NewState(scope.ModelDB(), e.logger),
secretbackendstate.NewState(scope.ControllerDB(), e.logger),
nil,
e.logger,
service.SecretServiceParams{
BackendUserSecretConfigGetter: service.NotImplementedBackendUserSecretConfigGetter,
Expand Down
2 changes: 1 addition & 1 deletion domain/secret/modelmigration/import.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ func (i *importOperation) Setup(scope modelmigration.Scope) error {
backendstate := secretbackendstate.NewState(scope.ControllerDB(), i.logger)
i.service = service.NewSecretService(
state.NewState(scope.ModelDB(), i.logger),
backendstate, i.logger,
backendstate, nil, i.logger,
service.SecretServiceParams{
BackendUserSecretConfigGetter: service.NotImplementedBackendUserSecretConfigGetter,
},
Expand Down

0 comments on commit 8650812

Please sign in to comment.