Update Server Manager to v1.0.8 with Async Caching and Apply Command#198
Update Server Manager to v1.0.8 with Async Caching and Apply Command#198
Conversation
…pply command. - Updated `server_manager/Cargo.toml` to version 1.0.8 and enabled `async_tokio` feature for `criterion`. - Refactored `server_manager/src/core/config.rs` to include `enable_service_async` and `disable_service_async` methods using a static `OnceLock` cache for thread-safe configuration management. - Refactored `server_manager/src/core/users.rs` to include `add_user_async` and `delete_user_async` methods using a static `OnceLock` cache, improving performance and thread safety. - Updated `server_manager/src/interface/cli.rs` to add the `apply` command, which orchestrates configuration, initialization, and deployment. - Refactored `server_manager/src/interface/web.rs` to utilize the new async methods in `Config` and `UserManager`, removing redundant local caching logic and ensuring consistency via the `apply` command. - Updated `README.md` to reflect the new version and document the `apply` command.
|
👋 Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
This PR updates Server Manager to version 1.0.8 and introduces significant optimizations and architectural improvements.
Key Changes:
Confignow supportsenable_service_asyncanddisable_service_asyncmethods that utilize a staticRwLockcache. This ensures atomic updates and minimizes disk I/O by checking file modification times.UserManagernow includesadd_user_asyncanddelete_user_asyncmethods, also leveraging a static cache. It safely handles blocking system calls (likeuseradd) viaspawn_blocking.applyCommand: The CLI now supports aserver_manager applycommand. This command encapsulates the logic for configuring services, initializing system dependencies, generating thedocker-compose.yml, and deploying the stack. This logic is shared between the CLI and the Web Interface.web.rs) has been refactored to remove local caching logic, instead relying on the robust static caches inConfigandUserManager. Handlers now trigger configuration updates and call theapplycommand to deploy changes, ensuring UI actions are reflected in the running system.README.mdis updated to version 1.0.8 and includes documentation for the newapplycommand.These changes improve the responsiveness of the Web UI, ensure thread safety for concurrent operations, and provide a cleaner separation of concerns between state management and interface logic.
PR created automatically by Jules for task 16348557178911879296 started by @Cylae