Skip to content

[Bug]: Run/job status in UI/CLI is shown as provisioning instead of pulling #2834

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conversation

peterschmidt85
Copy link
Contributor

Fixes #2830

Comment on lines +551 to +553
job_status = (
jobs[0].job_submissions[-1].status if jobs and jobs[0].job_submissions else None
)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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
)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, merged without! Will fix separately!

@peterschmidt85 peterschmidt85 merged commit 0b53d25 into master Jun 23, 2025
25 checks passed
@peterschmidt85 peterschmidt85 deleted the 2830-bug-runjob-status-in-uicli-is-shown-as-provisioning-instead-of-pulling branch June 23, 2025 13:47
@peterschmidt85 peterschmidt85 restored the 2830-bug-runjob-status-in-uicli-is-shown-as-provisioning-instead-of-pulling branch June 23, 2025 13:47
haydnli-shopify pushed a commit to haydnli-shopify/dstack that referenced this pull request Jun 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: Run/job status in UI/CLI is shown as provisioning instead of pulling
2 participants