[Bug]: Run/job status in UI/CLI is shown as provisioning instead of pulling#2834
Merged
peterschmidt85 merged 1 commit intomasterfrom Jun 23, 2025
Conversation
jvstme
approved these changes
Jun 23, 2025
Comment on lines
+551
to
+553
| job_status = ( | ||
| jobs[0].job_submissions[-1].status if jobs and jobs[0].job_submissions else None | ||
| ) |
Collaborator
There was a problem hiding this comment.
For multi-job runs, it can be misleading to rely solely on the status of the first job.
Consider a two-replica service. If the first replica is pulling and the second is running, the current implementation will set the run status message to pulling.
NAME BACKEND RESOURCES PRICE STATUS SUBMITTED
test-service pulling 3 mins ago
replica=0 job=0 aws (us-west-2) cpu=2 mem=1GB disk=100GB (spot) $0.0025 pulling 21 sec ago
replica=1 job=0 aws (us-west-2) cpu=2 mem=1GB disk=100GB (spot) $0.0025 running 3 mins ago
However, if the first replica is running and the second is pulling, the message will be running.
NAME BACKEND RESOURCES PRICE STATUS SUBMITTED
test-service running 8 mins ago
replica=0 job=0 aws (us-west-2) cpu=2 mem=1GB disk=100GB (spot) $0.0025 running 6 mins ago
replica=1 job=0 aws (us-west-2) cpu=2 mem=1GB disk=100GB (spot) $0.0025 pulling 16 sec ago
This inconsistency is misleading because the replicas are supposed to have equal importance.
I can suggest to only rely on the job status for single-job runs. In multi-job runs, job statuses will not affect the run status message.
Suggested change
| job_status = ( | |
| jobs[0].job_submissions[-1].status if jobs and jobs[0].job_submissions else None | |
| ) | |
| job_status = ( | |
| jobs[0].job_submissions[-1].status | |
| if len(jobs) == 1 and jobs[0].job_submissions | |
| else None | |
| ) |
Contributor
Author
There was a problem hiding this comment.
Sorry, merged without! Will fix separately!
haydnli-shopify
pushed a commit
to haydnli-shopify/dstack
that referenced
this pull request
Jun 23, 2025
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.
Fixes #2830