Skip to content

feat: Add local testing API and enhance orion/orion-server #1306

Merged
Ivanbeethoven merged 1 commit into
gitmono-dev:mainfrom
yyjeqhc:feat_orion_task_status
Aug 4, 2025
Merged

feat: Add local testing API and enhance orion/orion-server #1306
Ivanbeethoven merged 1 commit into
gitmono-dev:mainfrom
yyjeqhc:feat_orion_task_status

Conversation

@yyjeqhc

@yyjeqhc yyjeqhc commented Aug 4, 2025

Copy link
Copy Markdown
Contributor

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

…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
@vercel

vercel Bot commented Aug 4, 2025

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
mega ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 4, 2025 5:53am

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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_range does not exist on the rand::rng() type in the rand crate. The correct method should be gen_range for generating random numbers within a range.
        rng.random_range(0..idle_workers.len())

orion-server/src/api.rs:649

  • The test imports IndexedRandom but 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);
}
}
}

Copilot AI Aug 4, 2025

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copilot uses AI. Check for mistakes.
@Ivanbeethoven

Copy link
Copy Markdown
Collaborator

LGTM

@Ivanbeethoven
Ivanbeethoven added this pull request to the merge queue Aug 4, 2025
Merged via the queue into gitmono-dev:main with commit 5a2b8d6 Aug 4, 2025
12 checks passed
@yyjeqhc
yyjeqhc deleted the feat_orion_task_status branch August 4, 2025 08:12
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.

3 participants