fix(hardware): use hardware_status window for listing and details trees#1990
fix(hardware): use hardware_status window for listing and details trees#1990alanpeixinho wants to merge 3 commits into
Conversation
0f1dc3f to
b017271
Compare
…hardware_status * Non longer limiting hardware listing to latest checkout. * Hardcoded TEST_ORIGINS also omitted origins from the Hardware dropdown. * Expand hardcoded test origins list. Closes kernelci#1983 Signed-off-by: Alan Peixinho <alan.peixinho@profusion.mobi>
b017271 to
8e04ba5
Compare
d39e3ec to
49879db
Compare
Stop selecting absolute tree tips for hardware details. Use hardware_status to pick the latest checkout per tree that actually ran the board, so older checkouts with tests still appear. Closes kernelci#1264 Signed-off-by: Alan Peixinho <alan.peixinho@profusion.mobi>
49879db to
6e00234
Compare
mentonin
left a comment
There was a problem hiding this comment.
I think we might need to iterate a little more on what should be counted as "current" for a given hardware platform or tree.
Deciding which builds and tests to show for a given platform should be the "easier" part, but deciding which hardwares, builds and tests to show for a given tree is complex
Example complications
Consider the following commit graph, where commits are marked according to the key:
- #: checkout with tests on platform X
- *: checkout with tests on platform Y
- $: checkout with tests on platform Z
- branch names in parentheses
G (dog)
/
A#*$ ---------B#* (cat)
\
C#*$ --- D* --- E (cow)
\
F#$ --- H# (elk)
Assuming every checkout has at least one test, latest_checkouts maps: cat -> B, elk -> F and cow -> D (no checkout on E yet). dog points to nothing (checkout on A declared cat for its branch)
Old implementation:
Only tests at latest_checkouts. Tests shown:
By platform:
- X:
cat@B,elk@H - Y:
cat@B,cow@D - Z: none
By tree:
cat:X@B,Y@Bcow:Y@Delk:X@H
New implementation:
Gets all tests in range. Tests shown:
By platform:
- X:
cat@(A,B),cow@C,elk@(F,H) - Y:
cat@(A,B),cow@(C,D), `elk@F - Z:
cat@A,cow@C,elk@F
By tree:
cat:X@(A,B),Y@(A,B),Z@Acow:X@C,Y@(C,D),Z@Felk:X@(F,H),Z@F
My expectation:
Gets latest checkout per (branch, platform) pair:
By platform:
- X in
cat@B,cow@C,elk@H - Y in
cat@B,cow@D - Z in
cat@A,cow@C,elk@F
By tree:
cat:(X,Y)@B,Z@Acow:Y@D,(X,Z)@Chawk:X@H,Y@F
Optionally, also fall back to checkouts at git topological (first) parents (would require major changes):
dogwould show(X,Y,Z)@Ahawkwould showZ@D
Some questions:
-
When looking at/aggregating a platform, which builds/tests should be included?
a) in the latest checked out commit per tree (current)
b) in any commit (this PR)
d) in the latest checked out commit with at least one build in that platform
c) in the latest checked out commit per {tree, identifier} (my suggestion) -
When looking at/aggregating a tree, which builds/tests should be included?
a) in the latest checked out commit (current)
b) in the latest commit and same tree
c) latest by identifier
d) latest by platform by identifier
| INNER JOIN | ||
| latest_checkout | ||
| ON | ||
| hardware_status.checkout_id = latest_checkout.checkout_id | ||
| AND | ||
| latest_checkout.start_time >= %(start_date)s | ||
| AND | ||
| latest_checkout.start_time <= %(end_date)s | ||
| WHERE | ||
| hardware_status.test_origin = %(origin)s | ||
| AND hardware_status.start_time >= %(start_date)s | ||
| AND hardware_status.start_time <= %(end_date)s | ||
| GROUP BY |
There was a problem hiding this comment.
I think this will overcount tests (getting all builds tests in the time range, including repeats/redos).
There was a problem hiding this comment.
You have a good point here.
We might need to go for the latest checkout where that hardware is present. What you think?
I think this is another point in favor of #1947.
There was a problem hiding this comment.
I have changed so we get the latest checkout on that hardware, without overcounting tests made in multiple checkouts within the time window.
…indow Signed-off-by: Alan Peixinho <alan.peixinho@profusion.mobi>
Good points. |
What it is
latest_checkout, so boards tested inside the selected time window still appear even when they were not on the newest tip.get_hardware_trees_head_commits/get_hardware_trees_dataresolve the latest checkout per tree fromhardware_statusin the window, so boards with tests on older checkouts still show data.TEST_ORIGINSlist so origins such aslinaro_pull_labs(and other active pull-lab origins) show in the origin dropdown.How to test
linaro_pull_labs,pullab_cloud_aws_arm64, andpull_labs_aws_ec2.?iquery parameter) are listed. (exynos onlinaro_pull_labsis the example highlighted on issue Hardware missing from Hardware table #1983)Closes #1983
Closes #1264
Closes #1705