GNU bug report logs -
#31197
[PATCH] http: Add /api/evaluations route.
Previous Next
Reported by: Mathieu Othacehe <m.othacehe <at> gmail.com>
Date: Tue, 17 Apr 2018 14:57:02 UTC
Severity: normal
Tags: patch
Done: Mathieu Othacehe <m.othacehe <at> gmail.com>
Bug is archived. No further changes may be made.
Full log
Message #8 received at 31197 <at> debbugs.gnu.org (full text, mbox):
Hello Mathieu,
Mathieu Othacehe <m.othacehe <at> 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’.
This bug report was last modified 7 years and 32 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.