Skip to content

feat/hardware improved filters - #2070

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

alanpeixinho wants to merge 7 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 3 times, most recently from 60b97e8 to 49f190c Compare September 2, 2026 13:54
Comment thread dashboard/src/api/hardware.ts Outdated
Comment on lines +32 to +33
export const buildOriginForSelectors = (diffFilter: TFilter): string =>
selectedFilterValues(diffFilter.buildOrigin) || DEFAULT_ORIGIN;

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unchecking every build origin makes the table query all origins and the tree/revision dropdown stay on maestro. The listing and the selector are then different datasets. Use the same empty-means-all rule as the selectors API (or disable the selector until an origin is chosen).

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice catch, the frontend was incorrectly feeding the revision selector. Fixed it. We now have the same behavior as the table.

felipebergamin

This comment was marked as outdated.

@alanpeixinho
alanpeixinho force-pushed the feat/hardware-improved-filters branch from 49f190c to 90c4432 Compare September 9, 2026 18:02
- 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.

Signed-off-by: Alan Peixinho <alan.peixinho@profusion.mobi>
Signed-off-by: Alan Peixinho <alan.peixinho@profusion.mobi>
Keep kernelci#1990 window membership after rebasing onto daily tables.

* Default listing filters hardware_daily_* by checkout_day only
* commitsList and by-revision still pass a checkout SELECT
* Drop the hardware_status join that gated boards to tree tips

Signed-off-by: Alan Peixinho <alan.peixinho@profusion.mobi>
Drop the maestro fallback so selectors match the listing table, and omit --origin from the kci-dev snippet when none is selected.
@alanpeixinho
alanpeixinho force-pushed the feat/hardware-improved-filters branch from a8fc74e to 6d886c6 Compare September 23, 2026 12:58

This branch has not been deployed

No deployments
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)

2 participants