Closed hdkshingala closed 8 months ago
The changes involve a simplification of the dependency injection setup for the objectstorage
module in an agent application. The fx.Annotate
annotation and fx.As
declaration have been removed, and the Provide
function now directly returns an interface type. This suggests a shift towards a more interface-oriented design, which may have been done to address issues with agent crashes when object storage is disabled.
File Path | Change Summary |
---|---|
cmd/aperture-agent/agent.go |
Removed fx.Annotate for objectstorage.Provide and fx.As for objectstorage.ObjectStorageIface . |
pkg/.../objectstorage/provide.go |
Changed Provide function return type from (*ObjectStorage, error) to (ObjectStorageIface, error) . |
Objective | Addressed | Explanation |
---|---|---|
Prevent agents from crashing when object storage is disabled (#3077) | ✅ |
As the rabbit hops through the field, Code refactored, the crashes healed. No more errors when storage is nil, Smooth runs the agent, calm and still. 🐇💻
Description of change
Fixes: #3077
Checklist
Summary by CodeRabbit
Refactor
objectstorage
module to streamline service provisioning.Documentation
objectstorage
service interface.