Skip to content

[UX] Report No quota / No balance for runs and fleets - #4372

Open
peterschmidt85 wants to merge 2 commits into
masterfrom
issue_496_quota_balance_provisioning
Open

peterschmidt85 wants to merge 2 commits into
masterfrom
issue_496_quota_balance_provisioning

Conversation

@peterschmidt85

@peterschmidt85 peterschmidt85 commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor

Changes the displayed provisioning failure to No quota or No balance in dstack Factory (including Sky) when no available offers remain and all matching offers have that availability. Mixed blockers and failed launch attempts keep their existing failure messages.

Surface Displayed field Before After
dstack ps STATUS no capacity no quota / no balance
dstack fleet instance row ERROR no_offers no quota / no balance
UI run/job lists and details Status No capacity No quota / No balance
UI instance details Termination reason No offers found No quota / No balance

These are failure messages. The lifecycle statuses remain failed for jobs/runs and terminated for fleet instances. The UI instance list still shows Terminated; it does not display the termination reason.

Backward compatibility

Jobs keep termination_reason=failed_to_start_due_to_no_capacity; instances keep termination_reason=no_offers. The specific failure is stored in termination_reason_message, so older replicas can read and process these rows during rolling deployments. Older servers still return no capacity as the job's status_message.

New termination-reason enum values are recognized but are not written by this fix. Emitting them is deferred until all supported rolling-upgrade source versions recognize them.

Notes

When provisioning finds no available offers, it fetches them again including unavailable offers. This repeats quota/balance DB queries in dstack Factory (including dstack Sky), and provider API calls on cache misses.

@peterschmidt85 peterschmidt85 changed the title Preserve quota and balance provisioning failures [UX] Show No quota and No balance when provisioning fails Oct 14, 2026
@peterschmidt85
peterschmidt85 marked this pull request as ready for review October 16, 2026 08:09
@r4victor

Copy link
Copy Markdown
Collaborator

Deployment: during a rolling update, old and new servers share the DB. If a new server saves one of the new job failure reasons, an old server fails when reading that job because it does not recognize the value. Safe rolling updates need two releases: first teach every server to read and handle these reasons without saving them; then start saving them. This draft must be split into those two releases before deployment.

Is this addressed?

@peterschmidt85
peterschmidt85 marked this pull request as draft October 16, 2026 10:36
@peterschmidt85
peterschmidt85 force-pushed the issue_496_quota_balance_provisioning branch from a79f3ec to ce3a87b Compare October 17, 2026 11:48
@peterschmidt85
peterschmidt85 marked this pull request as ready for review October 17, 2026 11:48
@peterschmidt85

peterschmidt85 commented Oct 17, 2026 •

Copy link
Copy Markdown
Contributor Author

@r4victor updated in 5e547cb:

  • Rolling deployment: retain existing stored reasons and use termination_reason_message for quota/balance. New enums are recognized but not emitted, so older replicas can read and process the rows.
  • Callback: removed along with the result wrapper. Existing list/iterable contracts are restored. A second lookup runs only when no offers are available to identify a common quota/balance restriction.

@peterschmidt85
peterschmidt85 marked this pull request as draft October 20, 2026 13:36
@peterschmidt85

Copy link
Copy Markdown
Contributor Author

@r4victor reworked as you suggested:

  • Removed callbacks and wrappers; existing offer lookup contracts are unchanged. Only when no available offers are found, a second lookup includes unavailable offers to check for a shared quota/balance restriction.
  • Kept existing stored termination reasons; quota/balance details go in termination_reason_message. New enum values are recognized but not written, so older replicas can process these rows during rolling updates.

Ready for review.

@peterschmidt85
peterschmidt85 marked this pull request as ready for review October 22, 2026 23:08
@peterschmidt85 peterschmidt85 changed the title [UX] Show No quota and No balance when provisioning fails [UX] Show quota and balance failure messages for runs and fleet instances Oct 22, 2026
@peterschmidt85 peterschmidt85 changed the title [UX] Show quota and balance failure messages for runs and fleet instances [UX] Show No quota / No balance when provisioning fails Oct 22, 2026
@peterschmidt85 peterschmidt85 changed the title [UX] Show No quota / No balance when provisioning fails [UX] Report No quota / No balance for runs and fleets Oct 22, 2026
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