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: 31197@debbugs.gnu.org
Subject: [bug#31197] [PATCH] http: Add /api/evaluations route.
Date: Wed, 18 Apr 2018 23:00:10 +0200	[thread overview]
Message-ID: <87po2wtelh.fsf@gnu.org> (raw)
In-Reply-To: <1523976961-7467-1-git-send-email-m.othacehe@gmail.com> (Mathieu Othacehe's message of "Tue, 17 Apr 2018 16:56:01 +0200")

Hello Mathieu,

Mathieu Othacehe <m.othacehe@gmail.com> skribis:

> * src/cuirass/database.scm (db-get-evaluations): New exported procedure.
> * src/cuirass/http.scm (url-handler): Add /api/evaluations route.
> * tests/http.scm ("http"): Add /api/evaluations test route.
> ---
> Hi Guix,
>
> Here's a patch to add /api/evaluations route. It allows to know which
> guix commit have been fully evaluated and builded by cuirass before
> checkouting them.

Awesome, I had been missing it.  :-)

Hydra doesn’t have such a thing apparently.  We should discuss with Alex
Kost to add support for it in Emacs-Guix.

> +(define (db-get-evaluations db)
> +  (let loop ((rows  (sqlite-exec db "SELECT * FROM Evaluations;"))
> +             (evaluations '()))

I think we should add a LIMIT and ORDER, like we do for ‘db-get-builds’,
to avoid sending too much data to clients and consing too much.

Could you try that?

Later we could add “filters” to select evaluations from one project or
branch.

> +    (match rows
> +      (() evaluations)

Rather (reverse evaluations).

> +                    (with-critical-section db-channel (db)
> +                                           (db-get-evaluations db)))))

Rather:

  (with-critical-section db-channel (db)
    (db-get-evaluations db))

Normally, ‘dir-locals.el’ has the right rule for this.

Thanks!

Ludo’.

  reply	other threads:[~2018-04-18 21:01 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-17 14:56 [bug#31197] [PATCH] http: Add /api/evaluations route Mathieu Othacehe
2018-04-18 21:00 ` Ludovic Courtès [this message]
2018-04-19  9:20   ` Mathieu Othacehe
2018-04-19 19:47     ` Alex Kost
2018-04-20 12:11     ` Ludovic Courtès
2018-04-20 13:14       ` Mathieu Othacehe

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=87po2wtelh.fsf@gnu.org \
    --to=ludo@gnu.org \
    --cc=31197@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).