refactor: upgrade ui orion-server api to v2#2036
refactor: upgrade ui orion-server api to v2#2036genedna merged 1 commit intoweb3infra-foundation:mainfrom
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: bba5b1642e
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
mega/orion-server/src/scheduler.rs
Lines 314 to 315 in 7ca415d
This enqueue path persists build_events, build_targets, and pending history before calling queue.enqueue_v2, which is the first place queue capacity is checked. When the queue is full, the function returns an error to the caller but leaves those rows behind, creating phantom builds/targets that were never actually queued or dispatched.
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| let target_id = pending_build_event | ||
| .targets | ||
| .first() | ||
| .map(|t| t.id) | ||
| .unwrap_or_else(Uuid::nil); |
There was a problem hiding this comment.
Keep queued builds bound to a real target id
Queued dispatch falls back to Uuid::nil() when pending_build_event.targets is empty, but enqueue_task_with_build_id_v2 now inserts an Uninitialized default target and then calls find_initialized_build_targets, which returns an empty list in that state. That makes queued builds run with target_id = nil, so later target state updates become no-ops against real build_targets records and target status remains stale.
Useful? React with 👍 / 👎.
| if worker.sender.send(msg).is_err() { | ||
| state.scheduler.active_builds.remove(&key); | ||
| worker.status = WorkerStatus::Idle; |
There was a problem hiding this comment.
Clean up retry build row on worker send failure
In the immediate retry branch, a new build event is inserted before dispatch, but if worker.sender.send(msg) fails this branch only removes in-memory state and returns BAD_GATEWAY. The persisted build event is left with end_at = NULL, so status APIs can later surface a retry as running even though it never started.
Useful? React with 👍 / 👎.
5f7d1b4
No description provided.