mobiusml/aana_sdk

[FEATURE REQUEST] Automatic Reload for Endpoints

Opened this issue · 1 comments

Feature Summary

Add reload functionality to aana deploy using watchfiles to detect changes and redeploy the application. This will initially focus on reloading only the Request Handler, ensuring that endpoints are reloaded upon changes.

Justification/Rationale

Introducing reload functionality to aana deploy will significantly enhance the developer experience by automating the redeployment process when changes are detected. This will streamline the development workflow and reduce manual intervention. Limiting the scope to reloading only the Request Handler allows for a focused and manageable implementation, providing immediate benefits while laying the groundwork for potential future expansions, including full deployment reloading.

Proposed Implementation

  1. Integration of watchfiles: Utilize the watchfiles library to monitor specific directories or files related to the Request Handler.
  2. Detection and Trigger: Upon detecting changes in the monitored files, automatically trigger the redeployment of the Request Handler.

For implementation reference, similar functionality can be seen in the Ray Serve script.

I already tried it and it works well. I will need some extra time to iron it out.