Add retrying around inserting channel instance derivations

This commit is contained in:
Christopher Baines 2024-08-29 09:38:44 +01:00
parent 4ab59f46b4
commit fd7b0a341d

View file

@ -2127,16 +2127,24 @@ SELECT 1 FROM derivation_source_file_nars WHERE derivation_source_file_id = $1"
(url git-repository-url) (url git-repository-url)
(commit commit))) (commit commit)))
(guix-source (guix-source
channel-derivations-by-system
guix-revision-id
(retry-on-missing-store-item
(lambda ()
(let ((guix-source
channel-derivations-by-system channel-derivations-by-system
(channel->source-and-derivations-by-system (channel->source-and-derivations-by-system
conn conn
channel-for-commit channel-for-commit
fetch-with-authentication? fetch-with-authentication?
#:parallelism parallelism)) #:parallelism parallelism)))
(guix-revision-id (let ((guix-revision-id
(load-channel-instances utility-thread-channel (load-channel-instances utility-thread-channel
git-repository-id commit git-repository-id commit
channel-derivations-by-system))) channel-derivations-by-system)))
(values guix-source
channel-derivations-by-system
guix-revision-id)))))))
(let ((store-item (let ((store-item
guix-derivation guix-derivation
(channel-derivations-by-system->guix-store-item (channel-derivations-by-system->guix-store-item