Skip to content

fix(clusters): report scheduling status when waiting for a cluster - #141

Merged
banjoh merged 2 commits into
mainfrom
evansmungai/sc-140200/fix-cmx-create-cluster-action-timeout-hides
Oct 19, 2026
Merged

banjoh merged 2 commits into
mainfrom
evansmungai/sc-140200/fix-cmx-create-cluster-action-timeout-hides

Conversation

@banjoh

@banjoh banjoh commented Oct 19, 2026

Copy link
Copy Markdown
Member

Summary

When a cluster stays queued, pollForStatus times out with only Cluster did not reach state running within N seconds. The API already reports why the cluster is waiting (last_scheduling_status, for example exceeds-limits), and pollForStatus already reads it, but it was only shown for the error state. This makes the reason visible while waiting and on timeout.

Changes

  • Include the last scheduling status, with the same explanation the vendor portal shows, in the per-poll debug line and in the timeout error.
  • Fail immediately when the cluster enters upgrade_error, as it already does for error, instead of waiting for the timeout.
  • Retry on 5xx and failure on other HTTP errors are unchanged, as is the function signature.

Example timeout error:

Cluster did not reach state running within 1200 seconds. Last status: queued, last scheduling status: exceeds-limits (quota exceeded, manage your quota on the Compatibility Matrix settings page in the vendor portal)

Testing

  • Added tests for the timeout error with a scheduling status and for upgrade_error. npm test passes.

Once released, bumping replicated-lib in replicated-actions surfaces this in the create-cluster and upgrade-cluster actions.

pollForStatus timed out with only "Cluster did not reach state running
within N seconds" when a cluster stayed queued. Include the cluster's last
scheduling status, with the vendor portal's explanation, in the poll output
and the timeout error, and stop waiting when a cluster enters upgrade_error.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
kriscoleman
kriscoleman previously approved these changes Oct 19, 2026

@kriscoleman kriscoleman left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

🧼 clean!

When every poll failed with a 5xx, the timeout error had no detail. Report
the last HTTP error, label the reported status as the last one observed and
say when later polls failed. Show only the raw scheduling status code for
error and upgrade_error, where "waiting for an available server" is
misleading, and build the scheduling status suffix in one helper.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@banjoh
banjoh merged commit df95cc6 into main Oct 19, 2026
1 check passed
@banjoh
banjoh deleted the evansmungai/sc-140200/fix-cmx-create-cluster-action-timeout-hides branch October 19, 2026 16:32
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