Repository navigation
fix(daemon,hub): a running job is not counted as ready or live - #593
Merged
Merged
Conversation
Member
Author
|
Code review before 0.51.0, finding 2: a job rebuilt through the candidate showed |
Since #544 a job is `running` while it runs. Two more places read that as "up", without the job exception the daemon's own checks have (#573): - The hub's summary (`Scope::glance`) counted a running job as ready, so a stack whose migration still ran showed as ready on the start page. It now counts as starting; the kind comes from the snapshot, as a service event carries none (#575). - The build timeline marked a job's build live from its start, and kept it live when the job then failed. A job's build is live once the job completed with exit code 0; `GET /v1/services/{name}/builds` passes the service's kind (#571). Closes #571 Closes #575 Bug-Class: running-read-as-ready Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… timeline A rebuild of a job that does not run goes through the candidate, which is cleared before the job starts: the entry stayed `building` and the final pass made it `interrupted` while the job ran, and a job that then failed showed `interrupted` (or `superseded` after the next change) instead of `failed`. The service events now set a job's build to `running` while it runs, `live` once it completed with exit code 0, and `failed` with the status's reason; a `running` build that is not the current one was interrupted. The test replays the candidate events. Code review before 0.51.0, finding 2. Bug-Class: running-read-as-ready Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
7schmiede
force-pushed
the
fix/571-job-running-not-ready
branch
from
November 19, 2026 12:07
19a81e4 to
f8928cc
Compare
This was referenced Nov 19, 2026
Merged
7schmiede
added a commit
that referenced
this pull request
Nov 23, 2026
Since #591 and #593 a job that runs is not counted as ready, which is right, but it went into "starting" instead: a training of hours in a lane showed as a service stuck in its start, and its stack card said "Starting" for a whole day. - The dashboard's `statusBucket` has a bucket of its own for a running job (`job`): the overview counts it as "running as a job", with its own filter, neither healthy nor starting; a job's shortcut card is in the info tone. - The hub's glance counts running jobs (`jobs`) instead of setting `starting`, so a stack with a running job is `ok`; the summary carries `jobs` and the started lanes' `lane_ready`/`lane_total` (additive, in `GET /hub/summary` and the `summary` event). - The start page says "Running · 1 job", and shows the lanes' services ("Services in lanes 1/4") while nothing of the main tree is up and a lane runs, instead of 0/4. - The mock hub gets `?mock=longjob` for it. Verification: the new vitest cases failed before the change (`expected 'starting' to be 'job'`, the card's label and lane figures) and pass with it; the hub's tests for the glance and the summary; the lane's dashboard with `?mock=longjob` shows shop "Running · 1 job", crm "Services in lanes 1/4", and the overview's "1 running as a job" filter lists `migrate`. Bug-Class: running-job-read-as-starting Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
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.
What and why
Since #544 a job (
kind = "job") isrunningwhile it runs. #573 taught the daemon's checks that; two places still read a running job as "up":Scope::glanceincrates/devstack-hub/src/notify/rules.rscounted a running job as ready, so a stack whose migration still ran showed as ready on the start page. It now counts as starting. The kind comes from the snapshot (a service event carries none).timeline::buildsmarked a job's buildliveas soon as it reportedrunning, and it stayed live when the job then failed. For a job, a build is live once the jobcompletedwith exit code 0; the builds endpoint passes the service's kind.No review card: no trust, concept, contract or term changes (the API's shapes are unchanged).
Bug fix
runningwas read as ready/live without the job exception (#544 changed whatrunningmeans for a job).running-read-as-ready(as #573)a_running_job_counts_as_starting_not_ready(glance(2, 2, false)instead of(1, 2, true)),a_jobs_build_is_live_once_the_job_completed(ccc,bbblive instead of onlyaaa). Daemon 230/230, hub 176/176. In a stack (Windows, own build): a job that runs 25 s; while it randevstack builds migratelisted no live build, after it completedfb37cbe23026 live. The hub's summary was not checked with a running hub of this build (unit test only).Status::Running,is_ready()and"running"across daemon, hub, CLI and node: the other readers already have the job exception (#573,commands.rs,client.rs). The dashboard'sstatusBucketcounts a running job as healthy: #591.Closes #571
Closes #575
🤖 Generated with Claude Code