Skip to content

[UX]: Active and finished jobs mixed in dstack stats #2316

@jvstme

Description

@jvstme

Steps to reproduce

  1. Run a service with 2 replicas.
    type: service
    name: nginx
    image: nginx
    port: 80
    replicas: 2
  2. Scale it down to 1 replica.
    type: service
    name: nginx
    image: nginx
    port: 80
    replicas: 1
  3. See dstack stats.

Actual behaviour

Shows two jobs, even though the second one is no longer running.

> dstack ps
 NAME               BACKEND          RESOURCES                         PRICE    STATUS      SUBMITTED 
 nginx                                                                          running     1 min ago 
   replica=0 job=0  aws (us-west-2)  1xCPU, 2GB, 100.0GB (disk), SPOT  $0.0056  running     1 min ago 
   replica=1 job=0  aws (us-west-2)  1xCPU, 2GB, 100.0GB (disk), SPOT  $0.0056  terminated  1 min ago

> dstack stats nginx
 NAME               CPU  MEMORY       GPU 
 nginx                                    
   replica=0 job=0  0%   23MB/2048MB  -   
   replica=1 job=0  0%   20MB/2048MB  -

Expected behaviour

Either:

  • Only show running jobs.
  • Show job statuses.

dstack version

0.18.42

Server logs

Additional information

No response

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