Capture finish time and failure reason on every test run#264
Merged
Conversation
The /admin "Recent failures" table reads straight from Bull's retained-failures list, which only sees jobs the testrunner threw — not test-level failures (sitespeed.io exits non-zero) or queue-down failures at submit time. The DB knows about all three modes via status='failed' but didn't store why a test failed or when it reached a terminal state, so the operator UI shows a health pill saying "1 failed in 24h" with an empty table underneath. Accurate but unactionable. This change makes the database authoritative for the failure picture. Two new columns are populated from every path that flips a row to 'failed' (Bull global:failed, queue-down submit, testrunner exit on the result queue), and finished_date is also stamped on completed runs so end-to-end and run-only durations become measurable — run_date today is the browsertime start timestamp, not finish. The follow-up that switches the admin table to read from the DB lands separately. The major bump is because existing deployments must run the included migration before rolling forward; it is metadata-only on Postgres 11+ so it runs in milliseconds, and ships with a sibling shell helper that wraps the docker-compose psql invocation. Co-authored-by: Claude 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.
The /admin "Recent failures" table reads straight from Bull's
retained-failures list, which only sees jobs the testrunner threw — not
test-level failures (sitespeed.io exits non-zero) or queue-down failures at
submit time. The DB knows about all three modes via status='failed' but didn't
store why a test failed or when it reached a terminal state, so the operator
UI shows a health pill saying "1 failed in 24h" with an empty table
underneath. Accurate but unactionable.
This change makes the database authoritative for the failure picture. Two new
columns are populated from every path that flips a row to 'failed' (Bull
global:failed, queue-down submit, testrunner exit on the result queue), and
finished_date is also stamped on completed runs so end-to-end and run-only
durations become measurable — run_date today is the browsertime start
timestamp, not finish. The follow-up that switches the admin table to read
from the DB lands separately.
The major bump is because existing deployments must run the included migration
before rolling forward; it is metadata-only on Postgres 11+ so it runs in
milliseconds, and ships with a sibling shell helper that wraps the
docker-compose psql invocation.
Co-authored-by: Claude noreply@anthropic.com