guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

02/02: Change select-required-builds-that-failed to exclude succeeded bu


From: Christopher Baines
Subject: 02/02: Change select-required-builds-that-failed to exclude succeeded builds
Date: Mon, 13 Jul 2020 13:57:39 -0400 (EDT)

cbaines pushed a commit to branch master
in repository data-service.

commit a1af644310bcd550a00851b442c0727f5d30c9a7
Author: Christopher Baines <mail@cbaines.net>
AuthorDate: Mon Jul 13 18:55:50 2020 +0100

    Change select-required-builds-that-failed to exclude succeeded builds
    
    Only include a failed build if that build server hasn't had any success
    building that output. The Guix Build Coordinator can build one output with
    many different builds, so this helps avoid showing lots of spurious 
failures.
---
 guix-data-service/model/build.scm | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)

diff --git a/guix-data-service/model/build.scm 
b/guix-data-service/model/build.scm
index 686e08d..96a3ab8 100644
--- a/guix-data-service/model/build.scm
+++ b/guix-data-service/model/build.scm
@@ -371,7 +371,17 @@ LEFT OUTER JOIN (
   ORDER BY build_id, id DESC
 ) AS latest_build_status
   ON builds.id = latest_build_status.build_id
-WHERE latest_build_status.status = 'failed'")
+WHERE latest_build_status.status = 'failed'
+  AND NOT EXISTS (
+    SELECT 1
+    FROM builds AS successful_builds
+    INNER JOIN build_status AS successful_builds_build_status
+      ON successful_builds.id = successful_builds_build_status.build_id
+    WHERE successful_builds.derivation_output_details_set_id =
+          builds.derivation_output_details_set_id
+      AND successful_builds.build_server_id = $2
+      AND successful_builds_build_status.status = 'succeeded'
+  )")
 
   (exec-query conn
               query



reply via email to

[Prev in Thread] Current Thread [Next in Thread]