feat: Add local testing API and enhance orion/orion-server #1306
Conversation
…beat and task scheduling 1.Added a new API in mono to enable local testing without login requirement 2.Implemented heartbeat mechanism in orion-server and orion for persistent connection and reconnection 3.Added task scheduling and status checking features in orion-server and orion
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
There was a problem hiding this comment.
Pull Request Overview
This PR introduces distributed build capabilities to the Orion system by implementing a client-server architecture with persistent WebSocket connections, heartbeat monitoring, and task scheduling. The changes enable local testing without authentication and enhance the build system with robust connection management.
- Added WebSocket-based communication protocol between workers and server with automatic reconnection
- Implemented heartbeat mechanism and health monitoring for worker nodes
- Enhanced task scheduling with proper worker status tracking and build completion handling
Reviewed Changes
Copilot reviewed 12 out of 12 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| orion/src/ws.rs | Complete rewrite implementing persistent WebSocket client with heartbeat and reconnection logic |
| orion/src/main.rs | Updated to use new WebSocket client with configurable worker ID and server address |
| orion/src/buck_controller.rs | Enhanced build execution with better error handling and structured logging |
| orion/src/api.rs | Simplified build API removing global state tracking in favor of WebSocket communication |
| orion/.env | Updated server endpoint for local development |
| orion-server/src/server.rs | Added health check background task and worker timeout management |
| orion-server/src/model/builds.rs | Updated database model to support optional end_at field and better documentation |
| orion-server/src/main.rs | Enhanced logging configuration and documentation |
| orion-server/src/api.rs | Major rewrite implementing worker management, task scheduling, and build output streaming |
| orion-server/Cargo.toml | Added chrono dependency for timestamp handling |
| orion-server/.env | Updated configuration paths and ports for local testing |
| mono/src/api/mr/mr_router.rs | Added unauthenticated merge endpoint for local testing |
Comments suppressed due to low confidence (2)
orion-server/src/api.rs:295
- The method
random_rangedoes not exist on therand::rng()type in the rand crate. The correct method should begen_rangefor generating random numbers within a range.
rng.random_range(0..idle_workers.len())
orion-server/src/api.rs:649
- The test imports
IndexedRandombut doesn't use it in the actual test. The test should either use this import or remove it and test the actual random selection logic used in the production code.
use rand::seq::IndexedRandom;
| return Ok(exit_status); | ||
| } | ||
| } | ||
| } |
There was a problem hiding this comment.
The function has unreachable code after the loop. The child.wait().await? at the end will never be executed because the loop can only exit via break statements, and when it breaks, the function returns early. This unreachable code should be removed.
|
LGTM |
Part of #1274
feat: Add local testing API and enhance orion/orion-server with heartbeat and task scheduling
1.Added a new API in mono to enable local testing without login requirement
2.Implemented heartbeat mechanism in orion-server and orion for persistent connection and reconnection
3.Added task scheduling and status checking features in orion-server and orion