Make backfilling blocked_builds a bit smarter
And drop the chunk size.
This commit is contained in:
parent
ed114265cd
commit
c46ee47632
1 changed files with 18 additions and 2 deletions
|
|
@ -312,7 +312,23 @@ WHERE EXISTS (
|
||||||
"
|
"
|
||||||
SELECT build_id
|
SELECT build_id
|
||||||
FROM latest_build_status
|
FROM latest_build_status
|
||||||
WHERE status IN ('failed', 'failed-dependency', 'failed-other', 'canceled')")
|
INNER JOIN builds
|
||||||
|
ON latest_build_status.build_id = builds.id
|
||||||
|
WHERE status IN ('failed', 'failed-dependency', 'failed-other', 'canceled')
|
||||||
|
AND NOT EXISTS (
|
||||||
|
SELECT 1
|
||||||
|
FROM builds AS other_builds
|
||||||
|
INNER JOIN latest_build_status AS other_latest_build_status
|
||||||
|
ON other_builds.id = other_latest_build_status.build_id
|
||||||
|
WHERE other_builds.derivation_output_details_set_id =
|
||||||
|
builds.derivation_output_details_set_id
|
||||||
|
AND other_latest_build_status.status IN ('succeeded', 'scheduled')
|
||||||
|
)
|
||||||
|
AND NOT EXISTS (
|
||||||
|
SELECT 1
|
||||||
|
FROM blocked_builds
|
||||||
|
WHERE blocking_derivation_output_details_set_id = builds.derivation_output_details_set_id
|
||||||
|
)")
|
||||||
|
|
||||||
(let ((build-ids
|
(let ((build-ids
|
||||||
(map car (exec-query conn query '()))))
|
(map car (exec-query conn query '()))))
|
||||||
|
|
@ -329,7 +345,7 @@ FROM latest_build_status
|
||||||
(handle-populating-blocked-builds-for-build-failures
|
(handle-populating-blocked-builds-for-build-failures
|
||||||
conn
|
conn
|
||||||
(map string->number ids))))))
|
(map string->number ids))))))
|
||||||
500
|
200
|
||||||
build-ids)))
|
build-ids)))
|
||||||
|
|
||||||
(define* (select-blocking-builds conn revision-commit
|
(define* (select-blocking-builds conn revision-commit
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue