Skip to content

[UX]: Improve the output of dstack ps #2655

Closed
@peterschmidt85

Description

@peterschmidt85

Problem

  1. The dstack ps command doesn't provide termination reason information.
  2. The dstack ps -v command is too verbose and is not prettified.

Example:

vscode               ssh (remote)           cpu=12 mem=30GB disk=26GB               instance                                 $0       terminated  4 weeks ago   STOPPED_BY_USER
 vscode                                                                                                                                terminated  4 weeks ago   STOPPED_BY_USER
 vscode               ssh (remote)           cpu=12 mem=30GB disk=26GB               instance                                 $0       terminated  4 weeks ago   STOPPED_BY_USER
 vscode                                                                                                                                failed      4 weeks ago   JOB_FAILED
                                                                                                                                                                 (FAILED_TO_START_DUE_TO_NO_CAPACITY)
 vscode               ssh (remote)           cpu=12 mem=30GB disk=26GB               instance                                 $0       failed      4 weeks ago   STOPPED_BY_USER
 vscode               ssh (remote)           cpu=12 mem=30GB disk=26GB               instance                                 $0       failed      4 weeks ago   JOB_FAILED
                                                                                                                                                                 (INTERRUPTED_BY_NO_CAPACITY)
 blue-mole-1          nebius (eu-north1)     cpu=2 mem=8GB disk=100GB                cpu-e2 2vcpu-8gb                         $0.0496  done        1 month ago   ALL_JOBS_DONE
 n

Note, the UI should be updated too

Image
  1. The RESERVATION column takes up too much space while often being empty.

  2. If extra space is freed, it can be used to add the COST column.

Solution

1 & 2. Instead of showing run status, pretty-print the run/job termination reason, e.g. in a way, similar to docker ps.

Examples:
STOPPED_BY_USER -> stopped
INTERRUPTED_BY_NO_CAPACITY -> spot interrupted
ALL_JOBS_DONE -> done
CONTAINER_EXITED_WITH_ERROR -> exited (number)
FAILED_TO_START_DUE_TO_NO_CAPACITY -> no capacity

This way, we provide more complete information while taking up at least half the space.

  1. Merge RESERVATION into INSTANCE

Example: <instance type> (<reservation-code>) or <instance type> if no reservation code is specified

  1. If -v is specified, add COST

Workaround

No response

Would you like to help us implement this feature by sending a PR?

Yes

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions