Skip to content

feat(hardware): add daily hardware aggregates recomputed from raw - #2037

Draft
alanpeixinho wants to merge 1 commit into
mainfrom
feat/hardware-daily-aggregates
Draft

feat(hardware): add daily hardware aggregates recomputed from raw#2037
alanpeixinho wants to merge 1 commit into
mainfrom
feat/hardware-daily-aggregates

Conversation

@alanpeixinho

@alanpeixinho alanpeixinho commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

Closes #2034

- Add hardware_daily_builds and hardware_daily_tests, keyed by the checkout's UTC
  day plus each grain's own origin and lab, so build and test counters can be
  filtered independently without counting a build once per test lab
- Add recompute_hardware_daily, rewriting a day wholesale from checkouts, builds
  and tests: no dedupe state, idempotent, grain changes need no data migration
- Label a platform with the longest compatible chain reported for it, shared by
  both tables, so a board is not listed once per lab that disagrees
- Roll back a day that produced no rows, so pruned raw cannot erase an aggregate
- Take an advisory lock per table and day, so the two schedules never rebuild the
  same day at once and collide on the primary key
- Run it hourly over 2 days for freshness and nightly over 60 days to heal late
  arrivals, with a healthcheck id and docs for it
- Cover the aggregation semantics with integration tests: boot and test split,
  dummy builds, one count per platform, compatibles, lab fallback, rerun, locked
  day and pruned raw
- Leave hardware_status written and read as before

Closes #2034

Signed-off-by: Alan Peixinho <alan.peixinho@profusion.mobi>
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.

HW-list: split hardware_status (migration + aggregations)

1 participant