guix-patches
[Top][All Lists]
Advanced

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

[bug#27876] [PATCH v2 1/3] cuirass: Store new information in database to


From: Ludovic Courtès
Subject: [bug#27876] [PATCH v2 1/3] cuirass: Store new information in database to prepare new HTTP API integration.
Date: Fri, 08 Sep 2017 17:59:30 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux)

Hi Mathieu,

I’m sorry that this patch series fell through the cracks!

Mathieu Othacehe <address@hidden> 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 before
> 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 and
> 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:

  “Augment the JOB alist with EVAL-ID and additional information
  gathered from JOB’s #:derivation.”

> +  (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 . ,…)
    …
    ,@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
>  
>  @item job_name
>  This text field holds the name of the job.
> +
> address@hidden system
> +This text field holds the system name of the derivation.
> +
> address@hidden nix_name
> +This text field holds the name of the derivation.

Maybe add: “---e.g., @code{coreutils-8.28}”.  (Am I right?)

Otherwise OK!

Of course if would be awesome to have more tests, but let’s not delay
this patch series further.  :-)

Thanks,
Ludo’.





reply via email to

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