Skip to content

fix(cli): show VM scheduling conditions - #488

Open
rksharma-owg wants to merge 2 commits into
openai:mainfrom
rksharma-owg:codex/explain-pending-vm
Open

fix(cli): show VM scheduling conditions#488
rksharma-owg wants to merge 2 commits into
openai:mainfrom
rksharma-owg:codex/explain-pending-vm

Conversation

@rksharma-owg

@rksharma-owg rksharma-owg commented Sep 7, 2026

Copy link
Copy Markdown

Closes #394.

Response to review

The scheduler already records the scheduled condition, so this revision keeps scheduling behavior unchanged and exposes that existing state in the CLI. orchard get vm NAME now includes a Conditions row rendered with v1.ConditionsHumanize, allowing a pending VM to show not scheduled alongside its lifecycle status.

Validation

  • gofmt on changed Go files
  • git diff --check
  • go test ./internal/command/get ./internal/controller/scheduler

No VM-backed integration tests were run locally.

Set a pending status message when no worker can schedule a VM and clear it once scheduling succeeds. Preserve changed and inactive VMs and avoid redundant status writes.

Closes openai#394
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 7, 2026

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review Completed 2026-09-09T01:48:16.516215Z cce821e New commits
🔒 Security Review Completed 2026-09-09T01:52:12.964943Z cce821e New commits
ℹ️ About Codex in GitHub

Your team has set up Codex to 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@edi-oai

edi-oai commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

Isn't this already achievable by looking at the scheduled condition?

I think we just need to expose it in the CLI.

@rksharma-owg rksharma-owg changed the title Explain when pending VMs are waiting for an available worker fix(cli): show VM scheduling conditions Sep 9, 2026
@rksharma-owg

Copy link
Copy Markdown
Author

Updated in commit cce821e per your review: the scheduler status-message change and its tests were removed, and the existing scheduled condition is now exposed through orchard get vm NAME as a humanized Conditions row.

Validation: go test ./internal/command/get ./internal/controller/scheduler and git diff --check pass.

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

Copy link
Copy Markdown

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: cce821e889

ℹ️ About Codex in GitHub

Your team has set up Codex to 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 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

table.AddRow("Clipboard sharing disabled", vm.NoClipboard)
table.AddRow("Status", vm.Status)
table.AddRow("Status message", vm.StatusMessage)
table.AddRow("Conditions", nonEmptyOrNone(v1.ConditionsHumanize(vm.Conditions)))

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Set the waiting message in the scheduler

When every worker is missing, offline, paused, incompatible, or at capacity, this row only renders the existing scheduled=false condition. schedulingLoopIteration still falls out of the worker loop without writing StatusMessage, so orchard get vm continues to show an empty status message and cannot distinguish waiting for worker availability from other pending work. Add the transactional waiting-message update to the scheduler and clear it when assignment succeeds rather than relying on ConditionsHumanize.

Useful? React with 👍 / 👎.

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.

Better explain pending state of a VM when no workers are available

2 participants