Skip to content

Comments

Update Server Manager to v1.0.8 with Async Caching and Apply Command#198

Open
Cylae wants to merge 1 commit intomainfrom
update-server-manager-v1.0.8-optimization-16348557178911879296
Open

Update Server Manager to v1.0.8 with Async Caching and Apply Command#198
Cylae wants to merge 1 commit intomainfrom
update-server-manager-v1.0.8-optimization-16348557178911879296

Conversation

@Cylae
Copy link
Owner

@Cylae Cylae commented Feb 18, 2026

This PR updates Server Manager to version 1.0.8 and introduces significant optimizations and architectural improvements.

Key Changes:

  1. Async Configuration Management: Config now supports enable_service_async and disable_service_async methods that utilize a static RwLock cache. This ensures atomic updates and minimizes disk I/O by checking file modification times.
  2. Async User Management: UserManager now includes add_user_async and delete_user_async methods, also leveraging a static cache. It safely handles blocking system calls (like useradd) via spawn_blocking.
  3. New apply Command: The CLI now supports a server_manager apply command. This command encapsulates the logic for configuring services, initializing system dependencies, generating the docker-compose.yml, and deploying the stack. This logic is shared between the CLI and the Web Interface.
  4. Web Interface Optimization: The Web Interface (web.rs) has been refactored to remove local caching logic, instead relying on the robust static caches in Config and UserManager. Handlers now trigger configuration updates and call the apply command to deploy changes, ensuring UI actions are reflected in the running system.
  5. Documentation: README.md is updated to version 1.0.8 and includes documentation for the new apply command.

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

…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.
@google-labs-jules
Copy link
Contributor

👋 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 @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant