refactor(Orion-server): support MR -> multiple tasks, task -> multiple builds#1428
Merged
genedna merged 4 commits intoSep 10, 2025
Merged
Conversation
…ingle build BREAKING CHANGE: Previously, each task was bound to a single build. Now, tasks can have multiple associated builds. This change modifies the database schema, task scheduling logic, and API contracts. Signed-off-by: MYUU <1405758738@qq.com>
Signed-off-by: MYUU <1405758738@qq.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR refactors the orion-server to support a many-to-many relationship between MRs, tasks, and builds, replacing the previous one-to-one task-build relationship. The changes enable more flexible build scheduling and execution workflows by allowing multiple tasks per MR and multiple builds per task.
- Database schema restructured to separate tasks and builds into distinct tables with proper foreign key relationships
- API endpoints updated to handle multiple builds per task with new response formats
- Task scheduling logic modified to support queuing and dispatching multiple builds
Reviewed Changes
Copilot reviewed 15 out of 15 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| orion-server/src/server.rs | Updated imports and database operations to use new builds table |
| orion-server/src/scheduler.rs | Refactored task queuing and build management for new data model |
| orion-server/src/model/tasks.rs | Restructured tasks entity with relationships to builds table |
| orion-server/src/model/builds.rs | New builds entity with foreign key relationship to tasks |
| orion-server/src/api.rs | Major API restructuring to handle multiple builds per task |
| orion-server/db/schema.sql | Database schema split into separate tasks and builds tables |
| jupiter/src/migration/ | Database migration files for the schema changes |
| jupiter/callisto/src/ | Updated ORM entities to match new schema |
| libra/src/command/status.rs | Minor code formatting improvements |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
…e builds - Fixed Clippy warning in worker dispatch - Changed args field type from array to json_binary for SQLite compatibility
slow2342
force-pushed
the
refactor/orion-server-logging
branch
from
September 10, 2025 03:01
99b625b to
e86c06f
Compare
Signed-off-by: MYUU <52773565+zhoujiaqi30@users.noreply.github.com>
genedna
approved these changes
Sep 10, 2025
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.
概要
本 PR 对 orion-server 的任务与构建关系进行了重构。
原先每个 task 只能绑定一个 build,现在一个 MR 可以关联多个 task,每个 task 也可以同时关联多个 build,以支持更灵活的调度与执行流程。
变更内容
tasks表为tasks与builds两张表;scheduler.rs、tasks.rs、api.rs等,适配新的MR-Task-Build关系;变更动机
注意事项
task_handler接口变更,需要 mege 端适配。关联 Issue
Related to #1379
相关人员
@benjamin-747 @Ivanbeethoven @liuyangjuncong20202570