Draft
Conversation
…cpp arbiter thread panicking
Contributor
There was a problem hiding this comment.
Pull request overview
This PR introduces a shared run_until_shutdown helper to simplify service loops and standardize shutdown behavior.
Changes:
- Added
run_until_shutdownutility (with tests) and exported it frompaddler’s public module tree. - Refactored several services to use
run_until_shutdowninstead of hand-rolledloop { tokio::select! { ... } }patterns. - Relaxed
async_traitSend requirements for theServicetrait and its implementations (#[async_trait(?Send)]).
Reviewed changes
Copilot reviewed 13 out of 14 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| paddler/src/run_until_shutdown.rs | New shutdown-driven loop helper plus unit tests. |
| paddler/src/lib.rs | Exposes the new run_until_shutdown module. |
| paddler/src/service.rs | Updates Service trait to #[async_trait(?Send)]. |
| paddler/src/service_manager.rs | Updates test Service impls to #[async_trait(?Send)]. |
| paddler/src/balancer/statsd_service/mod.rs | Refactors periodic metrics reporting to use run_until_shutdown. |
| paddler/src/balancer/reconciliation_service.rs | Refactors reconciliation loop to use run_until_shutdown. |
| paddler/src/agent/reconciliation_service.rs | Refactors reconciliation loop to use run_until_shutdown and changes behavior on channel close to return an error. |
| paddler/src/agent/management_socket_client_service.rs | Refactors keep-alive loop to use run_until_shutdown. |
| paddler/src/agent/llamacpp_arbiter_service.rs | Refactors arbiter loop to use run_until_shutdown and uses the provided shutdown receiver for forwarded requests. |
| paddler/src/balancer/web_admin_panel_service/mod.rs | Switches to #[async_trait(?Send)]. |
| paddler/src/balancer/management_service/mod.rs | Switches to #[async_trait(?Send)]. |
| paddler/src/balancer/inference_service/mod.rs | Switches to #[async_trait(?Send)]. |
| paddler/src/balancer/compatibility/openai_service/mod.rs | Switches to #[async_trait(?Send)]. |
| package-lock.json | Adds "peer": true metadata to multiple entries. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
…cpp arbiter thread panicking