From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55044) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dqLhP-00014F-VX for guix-patches@gnu.org; Fri, 08 Sep 2017 12:00:08 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dqLhK-0006tK-Cs for guix-patches@gnu.org; Fri, 08 Sep 2017 12:00:08 -0400 Received: from debbugs.gnu.org ([208.118.235.43]:47512) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dqLhK-0006tE-AT for guix-patches@gnu.org; Fri, 08 Sep 2017 12:00:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1dqLhJ-0005rA-Vx for guix-patches@gnu.org; Fri, 08 Sep 2017 12:00:02 -0400 Subject: [bug#27876] [PATCH v2 1/3] cuirass: Store new information in database to prepare new HTTP API integration. Resent-Message-ID: From: ludo@gnu.org (Ludovic =?UTF-8?Q?Court=C3=A8s?=) References: <20170730100759.17734-1-m.othacehe@gmail.com> <20170801195124.7030-1-m.othacehe@gmail.com> Date: Fri, 08 Sep 2017 17:59:30 +0200 In-Reply-To: <20170801195124.7030-1-m.othacehe@gmail.com> (Mathieu Othacehe's message of "Tue, 1 Aug 2017 21:51:22 +0200") Message-ID: <87o9ql89lp.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: Mathieu Othacehe Cc: 27876@debbugs.gnu.org Hi Mathieu, I=E2=80=99m sorry that this patch series fell through the cracks! Mathieu Othacehe skribis: > * bin/evaluate.in (fill-job): New procedure. > (main): Use it to fill informations (nix-name, system) that will later be > added to database. > * doc/cuirass.texi (Database)[Derivation]: Add system and nix_name fields. > (Database)[Builds]: Add id, status, timestamp, starttime and stoptime > fields. Remove output field. > (Database)[Outputs]: New table describing the build outputs. > * src/cuirass/base.scm (build-packages): Add new fields to build object b= efore > adding it to database. > * src/cuirass/database.scm (db-get-build, db-get-builds): New procedures = to get > a build by id from database and a list of builds using filter parameters > respectively. > * src/schema.sql (Outputs) : New table. > (Derivations): Add system and nix_name columns. > (Builds): Remove output column and add id, status, timestamp, starttime a= nd > stoptime columns. Overall looks good. Just some minor comments and you can push: > +(define (fill-job job eval-id) > + "Given JOB assoc list, add EVAL-ID to it. Also process #:nix-name and > + #:system from derivation stored in JOB." Rather: =E2=80=9CAugment the JOB alist with EVAL-ID and additional information gathered from JOB=E2=80=99s #:derivation.=E2=80=9D > + (let ((drv (read-derivation-from-file > + (assq-ref job #:derivation)))) > + ((compose > + (cut acons #:eval-id eval-id <>) > + (cut acons #:nix-name (derivation-name drv) <>) > + (cut acons #:system (derivation-system drv) <>)) > + job))) Rather: `((#:eval-id . ,eval-id) (#:nix-name . ,=E2=80=A6) =E2=80=A6 ,@job)) [...] > Copyright @copyright{} 2016, 2017 Mathieu Lirzin > +Copyright @copyright{} 2017 Mathieu Othacehe Add @* at the end of the previous line. > @quotation > Permission is granted to copy, distribute and/or modify this document > @@ -312,6 +313,13 @@ This field holds the @code{id} of an evaluation from= the >=20=20 > @item job_name > This text field holds the name of the job. > + > +@item system > +This text field holds the system name of the derivation. > + > +@item nix_name > +This text field holds the name of the derivation. Maybe add: =E2=80=9C---e.g., @code{coreutils-8.28}=E2=80=9D. (Am I right?) Otherwise OK! Of course if would be awesome to have more tests, but let=E2=80=99s not del= ay this patch series further. :-) Thanks, Ludo=E2=80=99.