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

@ -2128,15 +2128,23 @@ SELECT 1 FROM derivation_source_file_nars WHERE derivation_source_file_id = $1"
(commit commit))) (commit commit)))
(guix-source (guix-source
channel-derivations-by-system channel-derivations-by-system
(channel->source-and-derivations-by-system guix-revision-id
conn (retry-on-missing-store-item
channel-for-commit (lambda ()
fetch-with-authentication? (let ((guix-source
#:parallelism parallelism)) channel-derivations-by-system
(guix-revision-id (channel->source-and-derivations-by-system
(load-channel-instances utility-thread-channel conn
git-repository-id commit channel-for-commit
channel-derivations-by-system))) fetch-with-authentication?
#:parallelism parallelism)))
(let ((guix-revision-id
(load-channel-instances utility-thread-channel
git-repository-id commit
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