Dashboard status clarity: Requeued/Failed card + drop ambiguous Restarted label#507
Merged
Conversation
The card counts every unfinished job with a failure_message, which includes still-retrying (requeued, attempts <= retries) jobs as well as terminally failed/aborted ones. The label now reflects both so a job on attempt 1/2 is not surprising under a plain Failed heading. The per-row list already distinguishes Requeued from Failed via QueueHelper.
isRestarted() flagged any job that was fetched, had attempts >= 1 and no failure_message as Restarted. A fresh job running its first attempt matches that exact shape (just fetched, attempts incremented to 1, never failed), so every in-progress first-attempt job was mislabeled Restarted instead of Running. The state is also fundamentally undetectable: reset() clears fetched and attempts to 0, so once a reset job is re-picked-up it is identical to a first run. Remove the isRestarted() helper, the Restarted branch in failureStatus() (returns null now for a running job with no failure), and the Restarted badge branches in the admin templates. Such jobs now correctly render as Running.
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.
Summary
Two related admin-dashboard status-label fixes:
Requeued/Failed card — the "Failed" stat card counts
completed IS NULL AND failure_message IS NOT NULL, which includes still-retrying (requeued, attempts <= retries) jobs as well as terminally failed/aborted ones. A job on attempt 1/2 therefore showed under a plain "Failed" heading. Relabeled to Requeued/Failed to match what it counts (the?status=failedlink already targets this set).Drop the ambiguous "Restarted" label —
isRestarted()flagged anyfetched + attempts>=1 + no failure_messagejob as Restarted, but that is exactly a fresh job running its first attempt (just fetched, attempts incremented to 1, never failed). So every in-progress first-attempt job was mislabeled "Restarted". The state is undetectable anyway:reset()clearsfetched/attemptsto 0, so a re-picked-up reset job is identical to a first run. RemovedisRestarted(), the Restarted branch infailureStatus(), and the Restarted badge in the admin templates — such jobs now correctly show Running.Notes