Skip to content

feat/hardware improved filters - #2070

Open
alanpeixinho wants to merge 4 commits into
kernelci:mainfrom
profusion:feat/hardware-improved-filters
Open

feat/hardware improved filters#2070
alanpeixinho wants to merge 4 commits into
kernelci:mainfrom
profusion:feat/hardware-improved-filters

Conversation

@alanpeixinho

@alanpeixinho alanpeixinho commented Aug 25, 2026

Copy link
Copy Markdown
Contributor

Depends on: #2037

What it is

Replaces the hardware listing's single origin selector with five independent filters, querying the daily aggregate tables from #2037.

Backend

• /api/hardware/ reads hardware_daily_* with per-side filters: checkoutOrigin, buildOrigin, testOrigin, buildLab, testLab (comma-separated)
• Build and test counters filtered independently; a narrowed side decides which platforms appear
• New GET /api/hardware/filters/ — independent option lists, no cascading
• By-revision listing uses same daily path; deprecated origin aliases checkout + build origin

Frontend

• Filter drawer on hardware listing; TopBar origin hidden there
• URL via diffFilter; defaults: checkout + build origin = maestro

Part of #1989.

Closes #2035.

What to test

Prerequisite: #2037 merged and aggregates computed (recompute_hardware_daily --days=15)

• /api/hardware/: maestro defaults, each filter independently, empty param clears constraint, deprecated origin, commitsList
• /api/hardware/filters/: five lists, no cascading; pull-labs and virtual labs present
• By-revision + selectors work with side filters
• UI: drawer, URL params, unchecking origin shows all origins, revision selector unchanged

@alanpeixinho
alanpeixinho force-pushed the feat/hardware-improved-filters branch from 0a3976e to b1b1a9c Compare August 26, 2026 21:30
@alanpeixinho
alanpeixinho marked this pull request as ready for review August 27, 2026 21:13
@alanpeixinho
alanpeixinho force-pushed the feat/hardware-improved-filters branch from b1b1a9c to 32d0ac3 Compare August 27, 2026 21:15
- Add daily aggregate tables and recompute_hardware_daily (idempotent, locked,
  keeps rows when raw is pruned)
- Materialize day_tests once per day so both aggregate inserts share one raw scan
- Cron: hourly for today, every 6h for the last 7 days (drop the 60-day run)
- Wire prune_db, seed_test_data and update_db for the new tables
- Leave hardware_status written and read as before

Closes kernelci#2034

Signed-off-by: Alan Peixinho <alan.peixinho@profusion.mobi>
Store checkout origin so listings can filter without a join, rebuild
fifteen days for late tests, and drop the unused healthcheck. ANALYZE
the day temp table and raise work_mem in the cron txn so the planner
hashes instead of spilling.
Replace the global origin selector with a filter drawer for checkout/build/test
origin and build/test lab, backed by daily aggregate queries and a filters API.

* Query listing from daily tables with per-side filters
* Add GET /api/hardware/filters/ and multi-value filter params
* Add checkbox filter drawer via diffFilter
* Hide TopBar origin on hardware listing
* Default checkout/build origin to maestro
* Add tests and update OpenAPI schema

Signed-off-by: Alan Peixinho <alan.peixinho@profusion.mobi>
Resolves conflicting 0019 leaf nodes after rebasing onto main so CI can run migrate.
@alanpeixinho
alanpeixinho force-pushed the feat/hardware-improved-filters branch from 32d0ac3 to 60b97e8 Compare September 1, 2026 17:51
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: origin/lab filters (API + UI)

1 participant