Filter out narinfos with excessive size
This is currently an issue with ci.guix.gnu.org https://issues.guix.gnu.org/46212 for substitutes for outputs who's size exceed 32 bits of information.
This commit is contained in:
parent
c2254754d5
commit
15d7756ef8
1 changed files with 19 additions and 1 deletions
|
|
@ -16,8 +16,10 @@
|
||||||
;;; <http://www.gnu.org/licenses/>.
|
;;; <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
(define-module (guix-data-service substitutes)
|
(define-module (guix-data-service substitutes)
|
||||||
|
#:use-module (srfi srfi-1)
|
||||||
#:use-module (ice-9 match)
|
#:use-module (ice-9 match)
|
||||||
#:use-module (guix scripts substitute)
|
#:use-module (guix scripts substitute)
|
||||||
|
#:use-module (guix narinfo)
|
||||||
#:use-module (guix-data-service database)
|
#:use-module (guix-data-service database)
|
||||||
#:use-module (guix-data-service model build-server)
|
#:use-module (guix-data-service model build-server)
|
||||||
#:use-module (guix-data-service model nar)
|
#:use-module (guix-data-service model nar)
|
||||||
|
|
@ -54,6 +56,11 @@
|
||||||
key args)))))))
|
key args)))))))
|
||||||
build-servers)))))
|
build-servers)))))
|
||||||
|
|
||||||
|
(define %narinfo-max-size
|
||||||
|
(- (expt 2 (- (* 8 8) ;; 8 bytes
|
||||||
|
1))
|
||||||
|
1))
|
||||||
|
|
||||||
(define* (fetch-narinfo-files conn build-server-id build-server-url
|
(define* (fetch-narinfo-files conn build-server-id build-server-url
|
||||||
revision-commits
|
revision-commits
|
||||||
#:key specific-outputs)
|
#:key specific-outputs)
|
||||||
|
|
@ -80,4 +87,15 @@
|
||||||
(record-narinfo-details-and-return-ids
|
(record-narinfo-details-and-return-ids
|
||||||
conn
|
conn
|
||||||
build-server-id
|
build-server-id
|
||||||
narinfos))))))
|
(filter-map
|
||||||
|
(lambda (narinfo)
|
||||||
|
(if (> (narinfo-size narinfo)
|
||||||
|
%narinfo-max-size)
|
||||||
|
(begin
|
||||||
|
(simple-format (current-error-port)
|
||||||
|
"narinfo ~A has excessive size ~A\n"
|
||||||
|
(narinfo-path narinfo)
|
||||||
|
(narinfo-size narinfo))
|
||||||
|
#f)
|
||||||
|
narinfo))
|
||||||
|
narinfos)))))))
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue