Fix issue with handling failure to build system channel instance
That resulted in empty revisions. Raise an exception rather than returning #f.
This commit is contained in:
parent
683b375d56
commit
a3d0e72e48
1 changed files with 66 additions and 65 deletions
|
|
@ -2239,7 +2239,13 @@ WHERE builder != 'builtin:download'
|
|||
(assoc-ref channel-derivations-by-system
|
||||
(%current-system))
|
||||
'manifest-entry-item)))
|
||||
(if derivation-file-name-for-current-system
|
||||
|
||||
(unless derivation-file-name-for-current-system
|
||||
(raise-exception
|
||||
(make-exception-with-message
|
||||
(simple-format #f "Failed to generate store item for ~A\n"
|
||||
commit))))
|
||||
|
||||
(let ((derivation-for-current-system
|
||||
(read-derivation-from-file derivation-file-name-for-current-system)))
|
||||
(with-time-logging "building the channel derivation"
|
||||
|
|
@ -2249,8 +2255,7 @@ WHERE builder != 'builtin:download'
|
|||
|
||||
(values
|
||||
(derivation->output-path derivation-for-current-system)
|
||||
derivation-file-name-for-current-system))
|
||||
(values #f #f))))
|
||||
derivation-file-name-for-current-system))))
|
||||
|
||||
(prevent-inlining-for-tests channel-derivations-by-system->guix-store-item)
|
||||
|
||||
|
|
@ -2859,7 +2864,7 @@ WHERE builder != 'builtin:download'
|
|||
(destroy-resource-pool inf-and-store-pool)
|
||||
(destroy-resource-pool postgresql-connection-pool)
|
||||
|
||||
#t)
|
||||
*unspecified*)
|
||||
|
||||
(prevent-inlining-for-tests extract-information-from)
|
||||
|
||||
|
|
@ -3027,8 +3032,7 @@ WHERE builder != 'builtin:download'
|
|||
guix-derivation
|
||||
(channel-derivations-by-system->guix-store-item
|
||||
channel-derivations-by-system)))
|
||||
(if store-item
|
||||
(and
|
||||
|
||||
(extract-information-from conn
|
||||
guix-revision-id-promise
|
||||
commit guix-source store-item
|
||||
|
|
@ -3044,6 +3048,7 @@ WHERE builder != 'builtin:download'
|
|||
#:parallelism parallelism
|
||||
#:inferior-memory-limit
|
||||
inferior-memory-limit)
|
||||
|
||||
(let ((guix-revision-id
|
||||
(fibers-force guix-revision-id-promise)))
|
||||
(destroy-parallelism-limiter
|
||||
|
|
@ -3051,7 +3056,6 @@ WHERE builder != 'builtin:download'
|
|||
(destroy-thread-pool
|
||||
utility-thread-pool)
|
||||
|
||||
(and
|
||||
(if (defined? 'channel-news-for-commit
|
||||
(resolve-module '(guix channels)))
|
||||
(with-time-logging "inserting channel news entries"
|
||||
|
|
@ -3059,31 +3063,28 @@ WHERE builder != 'builtin:download'
|
|||
conn
|
||||
guix-revision-id
|
||||
(channel-news-for-commit channel-for-commit commit)))
|
||||
(begin
|
||||
(simple-format
|
||||
#t "debug: importing channel news not supported\n")
|
||||
#t))
|
||||
#t "debug: importing channel news not supported\n"))
|
||||
|
||||
(with-time-logging "updating builds.derivation_output_details_set_id"
|
||||
(update-builds-derivation-output-details-set-id
|
||||
conn
|
||||
guix-revision-id))
|
||||
|
||||
(update-package-derivations-table
|
||||
conn
|
||||
git-repository-id
|
||||
guix-revision-id
|
||||
commit)
|
||||
|
||||
(let ((stats (gc-stats)))
|
||||
(format (current-error-port)
|
||||
"gc-stats: time taken: ~3fs, times: ~d~%"
|
||||
(/ (assq-ref stats 'gc-time-taken)
|
||||
internal-time-units-per-second)
|
||||
(assq-ref stats 'gc-times))
|
||||
#t))))
|
||||
(begin
|
||||
(simple-format #t "Failed to generate store item for ~A\n"
|
||||
commit)
|
||||
#f)))))
|
||||
(assq-ref stats 'gc-times))))))
|
||||
|
||||
*unspecified*)
|
||||
|
||||
(define (enqueue-load-new-guix-revision-job conn git-repository-id commit source)
|
||||
(define query
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue