Repository navigation
feat(hardware): recompute daily hardware aggregates from raw - #2181
Draft
alanpeixinho wants to merge 3 commits into
Draft
alanpeixinho wants to merge 3 commits into
alanpeixinho wants to merge 3 commits into
Conversation
Add hardware_daily_builds and hardware_daily_tests keyed by checkout day, origin, lab, and platform. Depends on the labs migration already on main, so no merge migration is required. Signed-off-by: Alan Peixinho <[email protected]>
Rebuild one UTC day at a time with DELETE + INSERT, an advisory lock, and a rollback when raw rows are gone. Materialize the day's tests once, ANALYZE them, and raise work_mem so the planner hashes instead of spilling. Cron refreshes today hourly and the last 15 days every 6 hours. Wire prune_db, seed_test_data, and update_db for the new tables. Closes kernelci#2034 Signed-off-by: Alan Peixinho <[email protected]>
Filter hardware_daily_* on checkout_origin the same way raw rows use origin, so an origin-scoped prune cannot wipe every tenant's aggregates. Signed-off-by: Alan Peixinho <[email protected]>
This was referenced Oct 15, 2026
alanpeixinho
changed the base branch from
feat/hardware-daily-aggregate-tables
to
main
October 15, 2026 14:07
alanpeixinho
marked this pull request as draft
October 16, 2026 19:20
This branch has not been deployed
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
Rebuilds
hardware_daily_*from raw checkouts, builds, and tests. Cron runs--days=1hourly and--days=15every 6 hours.prune_dbdrops those rows bycheckout_day, and--originsfilterscheckout_origin.hardware_statusstays as it is.Depends on #2180. Merge that first.
Replaces #2037. That PR was opened from the upstream repo.
Closes #2034.
How to test
After #2180 is applied:
python manage.py recompute_hardware_daily --day=2025-07-18python manage.py recompute_hardware_daily --days=7python manage.py prune_db --older-than "30 days" --tables hardware_daily_builds,hardware_daily_tests --dry-run