unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: ludo@gnu.org (Ludovic Courtès)
To: Mathieu Othacehe <m.othacehe@gmail.com>
Cc: 27876@debbugs.gnu.org
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	[thread overview]
Message-ID: <87o9ql89lp.fsf@gnu.org> (raw)
In-Reply-To: <20170801195124.7030-1-m.othacehe@gmail.com> (Mathieu Othacehe's message of "Tue, 1 Aug 2017 21:51:22 +0200")

Hi Mathieu,

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

Mathieu Othacehe <m.othacehe@gmail.com> 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.
> +
> +@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: “---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’.

  parent reply	other threads:[~2017-09-08 16:00 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-30 10:07 [bug#27876] [PATCH] cuirass: add Hydra compatible HTTP API Mathieu Othacehe
2017-07-31 14:57 ` Ludovic Courtès
2017-08-01 19:48   ` Mathieu Othacehe
2017-08-02  9:22     ` Ludovic Courtès
2017-08-01 19:51 ` [bug#27876] [PATCH v2 1/3] cuirass: Store new information in database to prepare new HTTP API integration Mathieu Othacehe
2017-08-01 19:51   ` [bug#27876] [PATCH v2 2/3] cuirass: add Hydra compatible HTTP API Mathieu Othacehe
2017-09-08 16:00     ` Ludovic Courtès
2017-08-01 19:51   ` [bug#27876] [PATCH v2 3/3] cuirass: Add tests for new " Mathieu Othacehe
2017-09-08 16:01     ` Ludovic Courtès
2017-09-08 15:59   ` Ludovic Courtès [this message]
2017-09-08 19:13     ` bug#27876: [PATCH v2 1/3] cuirass: Store new information in database to prepare new HTTP API integration Mathieu Othacehe
2017-09-08 20:44       ` [bug#27876] " Ludovic Courtès
2017-09-09  7:48         ` Mathieu Othacehe
2017-09-10 13:01           ` Ludovic Courtès
2017-09-10 13:26             ` Mathieu Othacehe
2017-09-10 20:38               ` Ludovic Courtès

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87o9ql89lp.fsf@gnu.org \
    --to=ludo@gnu.org \
    --cc=27876@debbugs.gnu.org \
    --cc=m.othacehe@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).