Steps to reproduce
- Create a fleet whose instances are split into blocks:
type: fleet
name: blocks-repro
nodes: 0..1
blocks: auto
resources:
cpu: 4..8
memory: 8GB..32GB
- Run a workload that occupies one block:
type: task
name: blocks-repro-task
image: python:3.12-slim
commands:
- sleep 3600
resources:
cpu: 1
memory: 2GB..
- Compare
dstack ps -v with the run's resources in the UI (/runs, and the run's job list).
Actual behaviour
The UI reports the resources of the whole instance instead of the block the job actually got, so it disagrees with the CLI for the same run at the same moment. On a 4-block t3.xlarge:
dstack ps -v -> cpu=1 mem=4GB disk=100GB t3.xlarge (1/4)
UI /runs -> cpu=4 mem=16GB disk=100GB
Both figures are available in the API response — job_runtime_data.offer.instance.resources is the block (1 cpu, 4096 MiB), job_provisioning_data.instance_type.resources is the instance (4 cpus, 16384 MiB) — and the UI reads the latter:
|
const resources = run.latest_job_submission?.job_provisioning_data?.instance_type?.resources; |
|
return resources ? formatResources(resources) : '-'; |
The run's job list has the same issue:
|
export const getJobListItemResources = (job: IJob) => { |
|
const resources = job.job_submissions?.[job.job_submissions.length - 1]?.job_provisioning_data?.instance_type?.resources; |
|
return resources ? formatResources(resources) : '-'; |
Expected behaviour
The UI shows the resources allocated to the job, matching dstack ps.
dstack version
master 1298b421a (source checkout)
Server logs
Additional information
Steps to reproduce
dstack ps -vwith the run's resources in the UI (/runs, and the run's job list).Actual behaviour
The UI reports the resources of the whole instance instead of the block the job actually got, so it disagrees with the CLI for the same run at the same moment. On a 4-block
t3.xlarge:Both figures are available in the API response —
job_runtime_data.offer.instance.resourcesis the block (1 cpu, 4096 MiB),job_provisioning_data.instance_type.resourcesis the instance (4 cpus, 16384 MiB) — and the UI reads the latter:dstack/frontend/src/pages/Runs/List/helpers.ts
Lines 20 to 21 in 1298b42
The run's job list has the same issue:
dstack/frontend/src/pages/Runs/Details/Jobs/List/helpers.ts
Lines 9 to 11 in 1298b42
Expected behaviour
The UI shows the resources allocated to the job, matching
dstack ps.dstack version
master
1298b421a(source checkout)Server logs
Additional information