fix(cli): show VM scheduling conditions - #488
Conversation
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
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Isn't this already achievable by looking at the I think we just need to expose it in the CLI. |
|
Updated in commit Validation: |
There was a problem hiding this comment.
💡 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))) |
There was a problem hiding this comment.
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 👍 / 👎.
Closes #394.
Response to review
The scheduler already records the
scheduledcondition, so this revision keeps scheduling behavior unchanged and exposes that existing state in the CLI.orchard get vm NAMEnow includes aConditionsrow rendered withv1.ConditionsHumanize, allowing a pending VM to shownot scheduledalongside its lifecycle status.Validation
gofmton changed Go filesgit diff --checkgo test ./internal/command/get ./internal/controller/schedulerNo VM-backed integration tests were run locally.