Skip to content

Orion integrated with Scorpio. Added support for MR.#1252

Merged
benjamin-747 merged 1 commit into
gitmono-dev:mainfrom
Ivanbeethoven:main
Jul 23, 2025
Merged

Orion integrated with Scorpio. Added support for MR.#1252
benjamin-747 merged 1 commit into
gitmono-dev:mainfrom
Ivanbeethoven:main

Conversation

@Ivanbeethoven

Copy link
Copy Markdown
Collaborator

No description provided.

Copilot AI review requested due to automatic review settings July 23, 2025 07:01
@vercel

vercel Bot commented Jul 23, 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 Jul 23, 2025 7:30am

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 integrates Orion with Scorpio by adding merge request (MR) support to the build system. The changes enable the system to mount filesystems for specific merge requests before executing builds and implement retry logic for WebSocket message sending.

  • Added MR field to build requests and WebSocket messages
  • Implemented filesystem mounting functionality via HTTP API calls to Scorpio
  • Added retry mechanism for WebSocket message transmission

Reviewed Changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
orion/src/ws.rs Added MR field to WSMessage enum and implemented send_with_retry function
orion/src/buck_controller.rs Added mount_fs function and integrated MR parameter into build process
orion/src/api.rs Extended BuildRequest struct to include MR field
orion/Cargo.toml Added reqwest dependency for HTTP client functionality
orion-server/src/api.rs Updated task handler to include MR field in messages

Comment thread orion/src/ws.rs Outdated
Ok(_) => return Ok(()),
Err(_) => {
if attempt == MAX_RETRIES {
return Err(format!("达到最大重试次数({}), ", MAX_RETRIES));

Copilot AI Jul 23, 2025

Copy link

Choose a reason for hiding this comment

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

The error message is incomplete - it ends with a comma and space but no additional information. Consider completing the message or removing the trailing comma.

Suggested change
return Err(format!("达到最大重试次数({}), ", MAX_RETRIES));
return Err(format!("达到最大重试次数({})", MAX_RETRIES));

Copilot uses AI. Check for mistakes.
Comment thread orion/src/ws.rs Outdated
}
}
}
unreachable!()

Copilot AI Jul 23, 2025

Copy link

Choose a reason for hiding this comment

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

This unreachable!() statement is actually reachable. The loop can exit normally when attempt equals MAX_RETRIES, but the function doesn't return in that case, making this code reachable.

Suggested change
unreachable!()

Copilot uses AI. Check for mistakes.
// Prepare the command to run
// Note: `args` is a list of additional arguments to pass to the `buck

let _ = mount_fs(&repo, &mr).await;

Copilot AI Jul 23, 2025

Copy link

Choose a reason for hiding this comment

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

Silently ignoring the result of mount_fs could hide important errors. Consider handling the error appropriately, either by logging it or propagating it to the caller.

Suggested change
let _ = mount_fs(&repo, &mr).await;
if let Err(e) = mount_fs(&repo, &mr).await {
tracing::error!("Failed to mount filesystem for repo {} and MR {}: {}", repo, mr, e);
}

Copilot uses AI. Check for mistakes.

tracing::info!("Building {} in repo {} with target {}", id, repo, target);
// Prepare the command to run
// Note: `args` is a list of additional arguments to pass to the `buck

Copilot AI Jul 23, 2025

Copy link

Choose a reason for hiding this comment

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

The comment is incomplete - it ends abruptly with 'the `buck'. Consider completing this comment or removing it.

Suggested change
// Note: `args` is a list of additional arguments to pass to the `buck
// Note: `args` is a list of additional arguments to pass to the `buck` command,
// which is used to build the specified target in the given repository.

Copilot uses AI. Check for mistakes.

// Send POST request
let res = client
.post("http://localhost:2725/api/fs/mount")

Copilot AI Jul 23, 2025

Copy link

Choose a reason for hiding this comment

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

The hardcoded URL 'http://localhost:2725/api/fs/mount' should be configurable through environment variables or configuration files to support different deployment environments.

Suggested change
.post("http://localhost:2725/api/fs/mount")
.post(&*MOUNT_API_URL)

Copilot uses AI. Check for mistakes.
Signed-off-by: Xiaoyang Han <lux1an@qq.com>
@benjamin-747
benjamin-747 added this pull request to the merge queue Jul 23, 2025
Merged via the queue into gitmono-dev:main with commit 34ce904 Jul 23, 2025
11 checks passed
@Ivanbeethoven

Copy link
Copy Markdown
Collaborator Author

#1182

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