guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

branch master updated: Sort systems and targets for more deterministic b


From: Christopher Baines
Subject: branch master updated: Sort systems and targets for more deterministic behaviour
Date: Fri, 21 Jul 2023 07:12:46 -0400

This is an automated email from the git hooks/post-receive script.

cbaines pushed a commit to branch master
in repository data-service.

The following commit(s) were added to refs/heads/master by this push:
     new 348fe36  Sort systems and targets for more deterministic behaviour
348fe36 is described below

commit 348fe36b558ac42d9a63c13cb95ea708c76123cd
Author: Christopher Baines <mail@cbaines.net>
AuthorDate: Fri Jul 21 12:10:55 2023 +0100

    Sort systems and targets for more deterministic behaviour
    
    As the ordering from Guix seems to be non-deterministic.
---
 guix-data-service/jobs/load-new-guix-revision.scm | 15 +++++++++++----
 1 file 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"



reply via email to

[Prev in Thread] Current Thread [Next in Thread]