From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?UTF-8?Q?Cl=C3=A9ment?= Lassieur Subject: bug#33370: guix publish: at least one user will have to build a given substitute Date: Wed, 14 Nov 2018 11:18:53 +0100 Message-ID: <87muqcezci.fsf@lassieur.org> References: <87ftw4wnc7.fsf@lassieur.org> <87in10km16.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:52750) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gMsGN-0006ue-PF for bug-guix@gnu.org; Wed, 14 Nov 2018 05:19:12 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gMsGJ-00061b-Qa for bug-guix@gnu.org; Wed, 14 Nov 2018 05:19:11 -0500 Received: from debbugs.gnu.org ([208.118.235.43]:46738) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gMsGE-0005w0-56 for bug-guix@gnu.org; Wed, 14 Nov 2018 05:19:06 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1gMsGD-0003c1-W3 for bug-guix@gnu.org; Wed, 14 Nov 2018 05:19:02 -0500 Sender: "Debbugs-submit" Resent-Message-ID: In-reply-to: <87in10km16.fsf@gnu.org> List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+gcggb-bug-guix=m.gmane.org@gnu.org Sender: "bug-Guix" To: Ludovic =?UTF-8?Q?Court=C3=A8s?= Cc: 33370@debbugs.gnu.org Hi Ludo, Ludovic Court=C3=A8s writes: > Hello, > > Cl=C3=A9ment Lassieur 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 =E2=80=9Cnormal=E2=80=9D 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=E2=80=99t matter much. But at least one user will complain, and if it's a small laptop building Icecat... > For a single-user setup, I recommend not using =E2=80=98--cache=E2=80=99. Yes, that's what I did. >> 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=E2=80=99t think it=E2=80=99s particularly hac= kish: Cuirass > is the only place that can send a notification.) Basically we=E2=80=99d = run: > > cuirass --build-completion-hook=3D/some/program =E2=80=A6 > > and that program could do a GET on the right narinfo URL(s). Yeah I agree it's not that hackish. > This would be useful in reducing latency; the downside is that we=E2=80= =99d bake > lots of things, even possibly things that nobody ever needs. > > Thoughts? What about getting the first user to block until the baking is done? It will take more time for them but at least they won't have to build it locally. And things nobody use won't have to be baked. Cl=C3=A9ment