From 06bed4724d131c085b23c7a806170bf16d58c25f Mon Sep 17 00:00:00 2001 From: Christopher Baines Date: Tue, 10 Sep 2024 12:44:22 +0100 Subject: Support ignoring commits --- bffe/manage-builds.scm | 27 +++++++++++++++++---------- 1 file changed, 17 insertions(+), 10 deletions(-) diff --git a/bffe/manage-builds.scm b/bffe/manage-builds.scm index caa4893..46276c2 100644 --- a/bffe/manage-builds.scm +++ b/bffe/manage-builds.scm @@ -42,6 +42,7 @@ build-from-guix-data-service-submit-builds-for-channel-instances? build-from-guix-data-service-build-keyword-arguments build-from-guix-data-service-data-service-build-server-id + build-from-guix-data-service-ignore-commits start-submit-builds-fibers)) @@ -66,7 +67,9 @@ build-from-guix-data-service-revision-parameters (default '())) (parallelism build-from-guix-data-service-parallelism - (default 2))) + (default 2)) + (ignore-commits build-from-guix-data-service-ignore-commits + (default '()))) (define-exception-type &guix-data-service-error &error make-guix-data-service-error @@ -453,15 +456,19 @@ (build-from-guix-data-service-revision-parameters specification) #:retry-times 3)) (unseen-revisions - (filter-map (lambda (entry) - (let ((commit (assoc-ref entry "commit-hash"))) - (and (not (hash-ref processed-commits-hash - commit)) - (assoc-ref entry "data_available") - commit))) - (vector->list - (assoc-ref branch-revisions - "revisions"))))) + (filter-map + (lambda (entry) + (let ((commit (assoc-ref entry "commit-hash"))) + (and (not (hash-ref processed-commits-hash + commit)) + (not (member + commit + (build-from-guix-data-service-ignore-commits + specification))) + (assoc-ref entry "data_available") + commit))) + (vector->list + (assoc-ref branch-revisions "revisions"))))) (log-msg 'DEBUG (length unseen-revisions) " unseen revisions") (metric-set unseen-revisions-metric (length unseen-revisions)) -- cgit v1.2.3