Skip to content

refactor: upgrade ui orion-server api to v2#2036

Merged
genedna merged 1 commit intoweb3infra-foundation:mainfrom
benjamin-747:main
Mar 27, 2026
Merged

refactor: upgrade ui orion-server api to v2#2036
genedna merged 1 commit intoweb3infra-foundation:mainfrom
benjamin-747:main

Conversation

@benjamin-747
Copy link
Collaborator

No description provided.

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 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".

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

let mut queue = self.pending_tasks.lock().await;
queue.enqueue_v2(pending_build_event)?;

P1 Badge Defer DB writes until queue admission succeeds

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".

Comment on lines +447 to +451
let target_id = pending_build_event
.targets
.first()
.map(|t| t.id)
.unwrap_or_else(Uuid::nil);

Choose a reason for hiding this comment

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

P1 Badge 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 👍 / 👎.

Comment on lines +745 to +747
if worker.sender.send(msg).is_err() {
state.scheduler.active_builds.remove(&key);
worker.status = WorkerStatus::Idle;

Choose a reason for hiding this comment

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

P2 Badge 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 👍 / 👎.

@genedna genedna added this pull request to the merge queue Mar 27, 2026
Merged via the queue into web3infra-foundation:main with commit 5f7d1b4 Mar 27, 2026
9 checks passed
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.

2 participants