[UX] Wait for run provisioning in dstack attach; pretty-print "port in use" error during dstack apply and dstack attach#3562
Merged
peterschmidt85 merged 1 commit intomasterfrom Feb 11, 2026
Conversation
- Show a spinner with status table in `dstack attach` while the run is provisioning, matching the UX of `dstack apply`. - Handle `PortUsedError` gracefully in both `dstack attach` and `dstack apply` instead of showing a raw traceback. The error message suggests using `-p` to override the local port mapping. - Store the port number on `PortUsedError` for structured access. Co-authored-by: Cursor <cursoragent@cursor.com>
r4victor
approved these changes
Feb 11, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
dstack attachnow shows a live spinner with the run status table while the run is provisioning (same UX asdstack apply), instead of silently polling or exiting with an error.When a port is already in use, both
dstack attachanddstack applynow show a clear error message with a-psuggestion instead of a raw traceback: