Skip to content

fix(vms): report scheduling status when waiting for a VM - #142

Merged
banjoh merged 1 commit into
mainfrom
em/fix-vm-poll-error-messaging
Oct 19, 2026
Merged

banjoh merged 1 commit into
mainfrom
em/fix-vm-poll-error-messaging

Conversation

@banjoh

@banjoh banjoh commented Oct 19, 2026

Copy link
Copy Markdown
Member

Follow-up to #141 (sc-140200), which fixed this for clusters.

pollForVMStatus timed out with only VM did not reach state running within N seconds when a VM stayed queued, with no reason given. This brings it in line with pollForStatus:

  • Map last_scheduling_status on VM in getVMDetails. The vendor API already returns it.
  • Show the scheduling status, with its explanation, in the progress lines and the timeout error, labelled as the last observed status.
  • Report the HTTP error when every poll failed with a 5xx, or when later polls failed after the last observed status.
  • For the terminal error state, show only the raw scheduling code, so the message doesn't say "waiting for an available server".
  • Use the cluster's schedulingStatusSuffix helper (exported from clusters.ts, not from index.ts).

Tests: four new cases in src/vms.spec.ts. npm test passes (105 tests).

🤖 Generated with Claude Code

pollForVMStatus timed out with only "VM did not reach state running within
N seconds", the same problem pollForStatus had for clusters. Map the VM's
last_scheduling_status and report it, the last observed status and any
failing polls the same way, sharing the cluster helper.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@banjoh
banjoh merged commit 732ba7d into main Oct 19, 2026
1 check passed
@banjoh
banjoh deleted the em/fix-vm-poll-error-messaging branch October 19, 2026 16:53
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