guix-patches
[Top][All Lists]
Advanced

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

[bug#31197] [PATCH] http: Add /api/evaluations route.


From: Ludovic Courtès
Subject: [bug#31197] [PATCH] http: Add /api/evaluations route.
Date: Wed, 18 Apr 2018 23:00:10 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.3 (gnu/linux)

Hello Mathieu,

Mathieu Othacehe <address@hidden> 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 via email to

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