Skip to content

Dashboard status clarity: Requeued/Failed card + drop ambiguous Restarted label#507

Merged
dereuromark merged 2 commits into
masterfrom
rename-failed-card-requeued
May 28, 2026
Merged

Dashboard status clarity: Requeued/Failed card + drop ambiguous Restarted label#507
dereuromark merged 2 commits into
masterfrom
rename-failed-card-requeued

Conversation

@dereuromark
Copy link
Copy Markdown
Owner

@dereuromark dereuromark commented May 28, 2026

Summary

Two related admin-dashboard status-label fixes:

  1. 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=failed link already targets this set).

  2. Drop the ambiguous "Restarted" labelisRestarted() flagged any fetched + attempts>=1 + no failure_message job 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() clears fetched/attempts to 0, so a re-picked-up reset job is identical to a first run. Removed isRestarted(), the Restarted branch in failureStatus(), and the Restarted badge in the admin templates — such jobs now correctly show Running.

Notes

  • Tests updated (failureStatus no-failure case now null; isRestarted test removed).

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.
@dereuromark dereuromark changed the title Label dashboard Failed card as Requeued/Failed Dashboard status clarity: Requeued/Failed card + drop ambiguous Restarted label May 28, 2026
@dereuromark dereuromark merged commit 981b67f into master May 28, 2026
16 checks passed
@dereuromark dereuromark deleted the rename-failed-card-requeued branch May 28, 2026 16:48
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.

1 participant