Repository navigation
fix(daemon): a running job is a start in progress, not a service that is ready - #573
Merged
Merged
Conversation
… is ready Since #544 a job is `running` from its launch until it ends; before, it was `starting`. Two places still read `running` as "up" without the job exception that `start_and_wait`, `ensure_after` and a command's `requires` have: - The candidate pipeline (`candidate_inner`) counts a running job as a start in progress again: a change to its files while it runs keeps its paths for `resume_changes`, as it did while the job was `starting`. - A lane started on a pool node (`readiness`) waits for a running job until it completed, so a job that fails after it ran is reported and the start does not count as done before a migration ended. The progress count (`ready_count`) agrees with it: a running job is not ready, a completed one is (it was never counted before). - A warm restart of a lane on a node (`restart_services`) leaves a running job alone, as the local `restart_running` does (a job has no main instance); before, it stopped the job and ran it again. The lists of what runs on a node (`active_now`, `follow_state`) keep a running job: the local side counts it the same way (`is_active`). Found in review of #544. Bug-Class: running-read-as-ready Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Nov 18, 2026
Merged
7schmiede
added a commit
that referenced
this pull request
Nov 19, 2026
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>
7schmiede
added a commit
that referenced
this pull request
Nov 19, 2026
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 (#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 now `running` while the job runs, `live` once it completed with exit code 0, and `failed` with its reason; the test replays the candidate events of a rebuild (code review before 0.51.0, finding 2) (#571). The dashboard's own bucket for a running job is #591. Closes #571 Closes #575 Bug-Class: running-read-as-ready Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
7schmiede
added a commit
that referenced
this pull request
Nov 20, 2026
`statusBucket` read a `running` status as healthy whatever the service's kind, so the overview's count, its filter and a job's shortcut card put a migration that still runs there. It takes the service now (status and kind, both required, so no caller can leave the kind out) and puts a running job into `starting` until it completed, as the daemon (#573) and the hub's summary (#575) count it. The mock hub's `requires` check, which let a running job count as a ready dependency, uses it too. Closes #591 Bug-Class: running-read-as-ready 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 is
runningfrom its launch until it ends (before,starting). A code review before 0.49.4 (documented internally) found places that still readrunningas "up" without the job exception thatstart_and_wait,ensure_afterand a command'srequireshave:candidate_inner): a running job counts as a start in progress again, so a change to its files while it runs keeps its paths forresume_changes, as before A running job shows no usage and stays "starting" for its whole run #544. (A change to a job's own files was never built after the job, before A running job shows no usage and stays "starting" for its whole run #544 either; that would be new behaviour, not done here.)readiness): waits for a running job until it completed, so a job that fails after it ran is reported and the start does not count as done before a migration ended.ready_countagrees: a running job is not ready, a completed one is.restart_services): leaves a running job alone, as the localrestart_runningdoes; before, it stopped the job and ran it again.The lists of what runs on a node (
active_now,follow_state) keep a running job, as the localis_activedoes.Verification
running-read-as-readysupervisor::candidate::tests::a_change_while_a_job_runs_is_kept("the change waits for the job's start"),remote::tests::a_running_job_on_a_node_is_not_ready_yet(Some(Ok(()))instead ofNone; the restart part red with its line reverted).cargo test -p devstack-daemon221 passed, clippy clean.ready_count,restart_services. Left: the hub's summary (notify/rules.rs,Scope::glance) counts a running job as ready; it needs the service's kind in the snapshot (issue follows).🤖 Generated with Claude Code