aboutsummaryrefslogtreecommitdiff
path: root/guix-data-service
diff options
context:
space:
mode:
authorChristopher Baines <mail@cbaines.net>2023-07-21 12:10:55 +0100
committerChristopher Baines <mail@cbaines.net>2023-07-21 12:10:55 +0100
commit348fe36b558ac42d9a63c13cb95ea708c76123cd (patch)
tree8f4e68aa2f350bb24d7ceb51444bb17f5a393c25 /guix-data-service
parentef73305250c5ea83fffe393d643597e359eec1e9 (diff)
downloaddata-service-348fe36b558ac42d9a63c13cb95ea708c76123cd.tar
data-service-348fe36b558ac42d9a63c13cb95ea708c76123cd.tar.gz
Sort systems and targets for more deterministic behaviour
As the ordering from Guix seems to be non-deterministic.
Diffstat (limited to 'guix-data-service')
-rw-r--r--guix-data-service/jobs/load-new-guix-revision.scm15
1 files changed, 11 insertions, 4 deletions
diff --git a/guix-data-service/jobs/load-new-guix-revision.scm b/guix-data-service/jobs/load-new-guix-revision.scm
index 1168f03..278066b 100644
--- a/guix-data-service/jobs/load-new-guix-revision.scm
+++ b/guix-data-service/jobs/load-new-guix-revision.scm
@@ -383,7 +383,12 @@ WHERE job_id = $1")
(define (all-inferior-system-tests inf store guix-source guix-commit)
(define inf-systems
- (inferior-guix-systems inf))
+ ;; The order shouldn't matter here, but bugs in Guix can lead to different
+ ;; results depending on the order, so sort the systems to try and provide
+ ;; deterministic behaviour
+ (sort
+ (inferior-guix-systems inf)
+ string<?))
(define extract
`(lambda (store)
@@ -683,9 +688,11 @@ WHERE job_id = $1")
'(defined? 'targets
(resolve-module '(guix platform)))
inf)
- (inferior-eval
- '((@ (guix platform) targets))
- inf))
+ (sort
+ (inferior-eval
+ '((@ (guix platform) targets))
+ inf)
+ string<?))
(else
'("arm-linux-gnueabihf"