--- Begin Message ---
Subject: |
[PATCH] evaluate: Use a generic key to identify Cuirass arguments. |
Date: |
Wed, 13 Jun 2018 15:50:01 +0200 |
So that Cuirass specifications used to build 'guix-modular' can be named
differently than "guix" and "guix-modular" (see Guix's
build-aux/hydra/guix-modular.scm).
The name is used as a primary key, so before that commit, it was also
impossible to have several such specifications.
* bin/evaluate.in (main): Replace custom NAME (passed to PROC) with 'guix'.
Co-authored-by: Mathieu Othacehe <address@hidden>
---
bin/evaluate.in | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/bin/evaluate.in b/bin/evaluate.in
index d973c44..86d0e83 100644
--- a/bin/evaluate.in
+++ b/bin/evaluate.in
@@ -6,7 +6,8 @@ exec ${GUILE:address@hidden@} --no-auto-compile -e main -s "$0"
"$@"
;;;; evaluate -- convert a specification to a job list
;;; Copyright © 2016, 2018 Ludovic Courtès <address@hidden>
;;; Copyright © 2016, 2017 Mathieu Lirzin <address@hidden>
-;;; Copyright © 2017 Mathieu Othacehe <address@hidden>
+;;; Copyright © 2017, 2018 Mathieu Othacehe <address@hidden>
+;;; Copyright © 2018 Clément Lassieur <address@hidden>
;;;
;;; This file is part of Cuirass.
;;;
@@ -98,7 +99,7 @@ building things during evaluation~%")
(proc (module-ref %user-module proc-name))
(commit (assq-ref spec #:current-commit))
(name (assq-ref spec #:name))
- (args `((,(string->symbol name)
+ (args `((guix
(revision . ,commit)
(file-name . ,source))
,@(or (assq-ref spec #:arguments) '())))
--
2.17.1
--- End Message ---
--- Begin Message ---
Subject: |
Re: [bug#31813] [PATCH] evaluate: Use a generic key to identify Cuirass arguments. |
Date: |
Mon, 18 Jun 2018 18:16:54 +0200 |
User-agent: |
mu4e 1.0; emacs 26.1 |
Hi Ludovic,
Ludovic Courtès <address@hidden> writes:
> For the record, this calling convention comes from Hydra. In Hydra, a
> “jobset” can have several “inputs”, and they all show up in this ‘args’
> list, like:
>
> ((INPUT1 . PROPERTIES) (INPUT2 . PROPERTIES) …)
>
> where INPUT1 is the famous name shown above. (See
> <https://github.com/NixOS/hydra/blob/master/src/script/hydra-eval-guile-jobs.in>.)
>
>> And anyway if we force the argument key to 'guix', 'guix-checkout' or
>> 'guix-modular', it wouldn't prevent us to add other inputs (checkouts)
>> later, I think.
>
> It would prevent us from distinguishing between different inputs.
> Currently, at least with Hydra, we can do:
>
> (assoc-ref args 'some-input)
>
> and get the file-name, revision, etc. properties corresponding to
> ‘some-input’.
>
> So I think we should preserve this API.
>
> The problem we have though is that Cuirass has no notion of “input”. In
> Hydra’s schema, there’s ‘JobsetInputs’ (that’s where we get the input
> name from in the ‘args’ alist above), which is separate from ‘Jobset’
> (roughly equivalent to ‘Specifications’ in Cuirass.)
>
> https://github.com/NixOS/hydra/blob/master/src/sql/hydra.sql
>
> Perhaps what we should do is introduce an ‘Input’ table to begin with,
> and have ‘Specifications’ refer to one or more of these.
>
> How does that sound?
Excellent! That would be the fix for another issue we have: our
specifications also depend on our custom packages repository, which
would be another input (if my understanding is correct). I'll start
working on it.
> We can apply your patch in the meantime, so that we can effectively have
> several ‘guix-modular’ jobs for example, but what I mean to say is that
> it can only be a temporary workaround for a flaw that needs to be fixed.
Sure, I understand this. I pushed it.
> Thanks for your patience. :-)
Thanks for yours :-)
I'm closing this ticket, and I'll open a new one for the 'real' patch.
Clément
--- End Message ---