Skip to content

Commit 6fe589b

Browse files
fix: include builds from all matching checkouts in tree details queries (#1870)
1 parent b8d24ee commit 6fe589b

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

  • backend/kernelCI_app/queries

backend/kernelCI_app/queries/tree.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -802,7 +802,6 @@ def get_tree_details_builds(
802802
AND c.origin = %(origin_param)s
803803
ORDER BY
804804
c._timestamp DESC
805-
LIMIT 1
806805
)
807806
SELECT
808807
b.id AS build_id,
@@ -832,7 +831,7 @@ def get_tree_details_builds(
832831
iss.report_url AS issue_report_url
833832
FROM
834833
builds b
835-
INNER JOIN RELEVANT_CHECKOUTS rc ON b.checkout_id = rc.checkout_id
834+
INNER JOIN RELEVANT_CHECKOUTS rc ON b.checkout_id IN (SELECT checkout_id FROM RELEVANT_CHECKOUTS)
836835
LEFT JOIN incidents inc
837836
ON inc.build_id = b.id AND inc.test_id IS NULL
838837
LEFT JOIN issues iss

0 commit comments

Comments
 (0)