Skip to content

Capture finish time and failure reason on every test run#264

Merged
soulgalore merged 1 commit into
mainfrom
onlinetest-db-failure-fields
May 15, 2026
Merged

Capture finish time and failure reason on every test run#264
soulgalore merged 1 commit into
mainfrom
onlinetest-db-failure-fields

Conversation

@soulgalore

Copy link
Copy Markdown
Member

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

  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
@soulgalore
soulgalore merged commit 521323f into main May 15, 2026
10 checks passed
@soulgalore
soulgalore deleted the onlinetest-db-failure-fields branch May 15, 2026 09:00
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