Skip to content

Commit

Permalink
Fix crash with disabled object storage (#3078)
Browse files Browse the repository at this point in the history
### Description of change

Fixes: #3077 

## Summary by CodeRabbit

- **Refactor**
- Updated the dependency injection setup for the `objectstorage` module
to streamline service provisioning.

- **Documentation**
- Adjusted documentation to reflect changes in the `objectstorage`
service interface.
  • Loading branch information
hdkshingala authored Dec 26, 2023
1 parent 4f64b1d commit 0a1eac9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion cmd/aperture-agent/agent.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ func main() {
agentinfo.ProvideAgentInfo,
clockwork.NewRealClock,
agent.ProvidePeersPrefix,
fx.Annotate(objectstorage.Provide, fx.As(new(objectstorage.ObjectStorageIface))),
objectstorage.Provide,
fx.Annotate(AgentElectionPath, fx.ResultTags(config.NameTag(etcdclient.ElectionPathFxTag))),
),
fx.Supply(fx.Annotate(false, fx.ResultTags(config.NameTag(etcdclient.EnforceLeaderOnlyFxTag)))),
Expand Down
2 changes: 1 addition & 1 deletion pkg/objectstorage/provide.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ type ProvideParams struct {
}

// Provide ObjectStorage.
func Provide(in ProvideParams) (*ObjectStorage, error) {
func Provide(in ProvideParams) (ObjectStorageIface, error) {
var cfg storageconfig.ObjectStorageConfig
err := in.Unmarshaller.UnmarshalKey("object_storage", &cfg)
if err != nil {
Expand Down

0 comments on commit 0a1eac9

Please sign in to comment.