bug-guix
[Top][All Lists]
Advanced

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

bug#33370: guix publish: at least one user will have to build a given su


From: Ludovic Courtès
Subject: bug#33370: guix publish: at least one user will have to build a given substitute
Date: Wed, 14 Nov 2018 11:09:57 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux)

Hello,

Clément Lassieur <address@hidden> skribis:

> I've noticed that narinfo baking is triggered by user requests when the
> '--cache' option of 'guix publish' is used.  It means that the first
> user who will want it will get the 404 response and will have to build
> it manually.  (See guix/scripts/publish.scm, make-request-handler.)

Note that the first request (404) returns with an expiry of 5mn instead
of the default (much longer) expiry for “normal” 404s.

We discussed this behavior at length back then and that seemed to me
like a reasonable behavior for a service with many users: the first one
gets 404 (or has to wait for 5 more minutes), but when there are enough
users, it doesn’t matter much.

For a single-user setup, I recommend not using ‘--cache’.

> Would it be possible to trigger the baking right after the build is
> done?  So that every user can be sure that they will get the substitute
> once they know that Cuirass has built it.
>
> If 'guix publish' has no way to get the notification that a build is
> done, maybe Cuirass could trigger the baking?  (But that would be
> hackish in my opinion.)

I had that in mind: adding a build completion hook on Cuirass, which
could trigger baking (I don’t think it’s particularly hackish: Cuirass
is the only place that can send a notification.)  Basically we’d run:

  cuirass --build-completion-hook=/some/program …

and that program could do a GET on the right narinfo URL(s).

This would be useful in reducing latency; the downside is that we’d bake
lots of things, even possibly things that nobody ever needs.

Thoughts?

Ludo’.





reply via email to

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