From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:49109) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fToyR-0007xv-Ky for guix-patches@gnu.org; Fri, 15 Jun 2018 09:41:08 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fToyM-0005iF-Ly for guix-patches@gnu.org; Fri, 15 Jun 2018 09:41:07 -0400 Received: from debbugs.gnu.org ([208.118.235.43]:41211) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fToyM-0005ht-He for guix-patches@gnu.org; Fri, 15 Jun 2018 09:41:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1fToyM-0007IU-68 for guix-patches@gnu.org; Fri, 15 Jun 2018 09:41:02 -0400 Subject: [bug#31813] [PATCH] evaluate: Use a generic key to identify Cuirass arguments. Resent-Message-ID: References: <20180613135001.28724-1-clement@lassieur.org> <87po0txfq6.fsf@gnu.org> <87efh9ug1f.fsf@lassieur.org> <87tvq4v1x7.fsf@gnu.org> From: =?UTF-8?Q?Cl=C3=A9ment?= Lassieur In-reply-to: <87tvq4v1x7.fsf@gnu.org> Date: Fri, 15 Jun 2018 15:40:26 +0200 Message-ID: <87bmcctbg5.fsf@lassieur.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: Ludovic =?UTF-8?Q?Court=C3=A8s?= Cc: 31813@debbugs.gnu.org Heya! 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. Right now 'cuirass-jobs' can't handle several checkouts, and evaluate.in sends only one 'checkout'. So if we want to support several inputs we would need to modify both Guix and Cuirass. 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. >> I don't think the current situation is good because: >> - a simple mistake from the user gets their build task to silently >> vanish, >> - it is inconvenient to use guix-modular.scm with several different >> specifications, >> - that #:name key is useless if users can't choose a custom name, >> - allowing custom names would make it way easier to understand >> /api/latestbuilds. For an example with custom names, see >> https://cuirass.lassieur.org:8081/api/latestbuilds?nr=3D100. > > I agree with all this. :-) I think the custom name should appear in > the arguments passed to the build procedure, though. But with our patch it *does* appear in the build procedure, because it is still in 'eval' which is read by 'evaluate' in src/cuirass/base.scm. --8<---------------cut here---------------start------------->8--- (eval `((#:specification . ,name) (#:revision . ,commit))) pretty-print `(evaluation ,eval ,(map (lambda (thunk) (thunk)) thunks)) --8<---------------cut here---------------end--------------->8--- What we want to modify is the key passed to 'proc', and it is only used to extract the checkout argument (with 'assq-ref'). >> Using an auto-incrementing ID column could work, but I don't like it >> for the reasons I explained above. > > You didn=E2=80=99t mention auto-incrementing ID above, did you? It would= seem > like a simple solution to the problem. If we were to do this, - that would allow several specs to have the same name, - that would not change the fact that users are forced to use the 'guix-modular' (or 'guix') name for each spec. The former is nice but not necessary (it could be a further commit), the latter is the bug that we want to fix. Mathieu and Cl=C3=A9ment