From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:38787) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fU6qS-0004RE-6n for guix-patches@gnu.org; Sat, 16 Jun 2018 04:46:05 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fU6qQ-0003tN-SA for guix-patches@gnu.org; Sat, 16 Jun 2018 04:46:04 -0400 Received: from debbugs.gnu.org ([208.118.235.43]:43075) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fU6qQ-0003sn-Nd for guix-patches@gnu.org; Sat, 16 Jun 2018 04:46:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1fU6qQ-000624-FO for guix-patches@gnu.org; Sat, 16 Jun 2018 04:46:02 -0400 Subject: [bug#31813] [PATCH] evaluate: Use a generic key to identify Cuirass arguments. Resent-Message-ID: From: ludo@gnu.org (Ludovic =?UTF-8?Q?Court=C3=A8s?=) References: <20180613135001.28724-1-clement@lassieur.org> <87po0txfq6.fsf@gnu.org> <87efh9ug1f.fsf@lassieur.org> <87tvq4v1x7.fsf@gnu.org> <87bmcctbg5.fsf@lassieur.org> Date: Sat, 16 Jun 2018 10:45:33 +0200 In-Reply-To: <87bmcctbg5.fsf@lassieur.org> ("=?UTF-8?Q?Cl=C3=A9ment?= Lassieur"'s message of "Fri, 15 Jun 2018 15:40:26 +0200") Message-ID: <87fu1nqfv6.fsf@gnu.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: =?UTF-8?Q?Cl=C3=A9ment?= Lassieur Cc: 31813@debbugs.gnu.org Hello Cl=C3=A9ment & Mathieu, Trying to take a step back and look at how Hydra does things=E2=80=A6 Cl=C3=A9ment Lassieur skribis: > Ludovic Court=C3=A8s writes: > >>>>> @@ -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) '()))) >>>> >>>> If we do that, then everything is called =E2=80=98guix=E2=80=99. >>> >>> Why is it a problem? >> >> In theory you can have several inputs (checkouts) to a given jobset, and >> they need to have different names so that you can distinguish among >> them. For the record, this calling convention comes from Hydra. In Hydra, a =E2=80=9Cjobset=E2=80=9D can have several =E2=80=9Cinputs=E2=80=9D, and the= y all show up in this =E2=80=98args=E2=80=99 list, like: ((INPUT1 . PROPERTIES) (INPUT2 . PROPERTIES) =E2=80=A6) where INPUT1 is the famous name shown above. (See .) > 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 =E2=80=98some-input=E2=80=99. So I think we should preserve this API. The problem we have though is that Cuirass has no notion of =E2=80=9Cinput= =E2=80=9D. In Hydra=E2=80=99s schema, there=E2=80=99s =E2=80=98JobsetInputs=E2=80=99 (tha= t=E2=80=99s where we get the input name from in the =E2=80=98args=E2=80=99 alist above), which is separate fro= m =E2=80=98Jobset=E2=80=99 (roughly equivalent to =E2=80=98Specifications=E2=80=99 in Cuirass.) https://github.com/NixOS/hydra/blob/master/src/sql/hydra.sql Perhaps what we should do is introduce an =E2=80=98Input=E2=80=99 table to = begin with, and have =E2=80=98Specifications=E2=80=99 refer to one or more of these. How does that sound? We can apply your patch in the meantime, so that we can effectively have several =E2=80=98guix-modular=E2=80=99 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. Thanks for your patience. :-) Ludo=E2=80=99.