diff options
author | Christopher Baines <mail@cbaines.net> | 2023-09-17 14:04:07 +0100 |
---|---|---|
committer | Christopher Baines <mail@cbaines.net> | 2023-09-17 14:09:02 +0100 |
commit | 843231efe71dd69f52cfa1c69019ec8f8ea08661 (patch) | |
tree | 7734399368a0f62189d46de024d6f82803b15f53 | |
parent | 96e85c3ff9dbc55bcabeceff6ef45c54151ce7b3 (diff) | |
download | qa-frontpage-843231efe71dd69f52cfa1c69019ec8f8ea08661.tar qa-frontpage-843231efe71dd69f52cfa1c69019ec8f8ea08661.tar.gz |
Ignore canceled builds when looking at changes
-rw-r--r-- | guix-qa-frontpage/manage-builds.scm | 29 |
1 files changed, 18 insertions, 11 deletions
diff --git a/guix-qa-frontpage/manage-builds.scm b/guix-qa-frontpage/manage-builds.scm index f8bb5fe..7f93e47 100644 --- a/guix-qa-frontpage/manage-builds.scm +++ b/guix-qa-frontpage/manage-builds.scm @@ -541,11 +541,12 @@ "") (member (assoc-ref change "system") %systems-to-submit-builds-for)) - (if (= (vector-length - (assoc-ref change "builds")) - 0) - #t - #f) + (not + (vector-any + (lambda (build) + (member (assoc-ref build "status") + '("scheduled" "started" "succeeded" "failed"))) + (assoc-ref change "builds"))) #f)) (vector-fold (lambda (_ result package) @@ -644,16 +645,18 @@ (member (assoc-ref change "system") %systems-to-submit-builds-for)) (loop (cdr changes) - (if (= (vector-length - (assoc-ref change "builds")) - 0) + (if (vector-any + (lambda (build) + (member (assoc-ref build "status") + '("scheduled" "started" "succeeded" "failed"))) + (assoc-ref change "builds")) + builds-to-submit-details ; build exists (cons (list (assoc-ref change "derivation-file-name") (if (number? priority) priority (priority change))) - builds-to-submit-details) - builds-to-submit-details) ; build exists + builds-to-submit-details)) (fold (lambda (build result) (if (member (assoc-ref build "status") '("scheduled" "started")) @@ -735,7 +738,11 @@ (when (and (not (member name %system-tests-that-change-every-revision)) - (= (vector-length builds) 0)) + (vector-any + (lambda (build) + (member (assoc-ref build "status") + '("scheduled" "started" "succeeded" "failed"))) + builds)) (submit-build build-coordinator guix-data-service (assoc-ref system-test-details "derivation") |