GNU bug report logs - #33370
Cuirass: Trigger 'guix publish' baking

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: guix; Reported by: Clément Lassieur <clement@HIDDEN>; dated Tue, 13 Nov 2018 23:49:01 UTC; Maintainer for guix is bug-guix@HIDDEN.
Changed bug title to 'Cuirass: Trigger 'guix publish' baking' from 'guix publish: at least one user will have to build a given substitute' Request was from clement@HIDDEN (Clément Lassieur) to control <at> debbugs.gnu.org. Full text available.

Message received at 33370 <at> debbugs.gnu.org:


Received: (at 33370) by debbugs.gnu.org; 14 Nov 2018 15:34:14 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Nov 14 10:34:14 2018
Received: from localhost ([127.0.0.1]:52399 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1gMxBG-0000z1-Fb
	for submit <at> debbugs.gnu.org; Wed, 14 Nov 2018 10:34:14 -0500
Received: from mail.lassieur.org ([83.152.10.219]:40080)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <clement@HIDDEN>) id 1gMxBE-0000yp-58
 for 33370 <at> debbugs.gnu.org; Wed, 14 Nov 2018 10:34:12 -0500
Received: from newt (smtp.parrot.biz [62.23.167.188])
 by mail.lassieur.org (OpenSMTPD) with ESMTPSA id 093ae535
 (TLSv1.2:ECDHE-RSA-CHACHA20-POLY1305:256:NO); 
 Wed, 14 Nov 2018 15:34:10 +0000 (UTC)
References: <87ftw4wnc7.fsf@HIDDEN> <87in10km16.fsf@HIDDEN>
 <87muqcezci.fsf@HIDDEN> <877ehfg1ed.fsf@HIDDEN>
User-agent: mu4e 1.0; emacs 26.1
From: =?utf-8?Q?Cl=C3=A9ment?= Lassieur <clement@HIDDEN>
To: Ludovic =?utf-8?Q?Court=C3=A8s?= <ludo@HIDDEN>
Subject: bug#33370: Cuirass: Trigger 'guix publish' baking
In-reply-to: <877ehfg1ed.fsf@HIDDEN>
Date: Wed, 14 Nov 2018 16:34:09 +0100
Message-ID: <87a7mbad1q.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 33370
Cc: 33370 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Ludovic Court=C3=A8s <ludo@HIDDEN> writes:

>>> 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?
>
> That=E2=80=99s generally not possible because HTTP is supposedly synchron=
ous.
> Also, =E2=80=98guix publish=E2=80=99 has a bunch of worker threads that p=
ick baking
> tasks from a queue.  When the queue is empty and you asking for a
> substitute of sed, it will take seconds to bake it; but when the queue
> is already large and you=E2=80=99re asking for LibreOffice, it could take=
 a few
> minutes.
>
> For the intended use case, which is a build farm with many users,
> optimizing for the first user makes little sense IMO.

I don't agree, because I find it stressful when you build something and
you're not 100% sure you'll get the substitute.  If someone is the only
user of several Guix packages (and I think it's the case for many of our
users), they'll have to re-build them locally every time one of their
dependencies is updated.

So if I understand well, the Cuirass solution seems the best...  I leave
the bug open but I change the name :-)

Thank you,
Cl=C3=A9ment




Information forwarded to bug-guix@HIDDEN:
bug#33370; Package guix. Full text available.

Message received at 33370 <at> debbugs.gnu.org:


Received: (at 33370) by debbugs.gnu.org; 14 Nov 2018 14:49:25 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Nov 14 09:49:25 2018
Received: from localhost ([127.0.0.1]:51129 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1gMwTs-0007uc-S0
	for submit <at> debbugs.gnu.org; Wed, 14 Nov 2018 09:49:25 -0500
Received: from eggs.gnu.org ([208.118.235.92]:33263)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <ludo@HIDDEN>) id 1gMwTr-0007uQ-He
 for 33370 <at> debbugs.gnu.org; Wed, 14 Nov 2018 09:49:23 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <ludo@HIDDEN>) id 1gMwTl-0002L1-FK
 for 33370 <at> debbugs.gnu.org; Wed, 14 Nov 2018 09:49:18 -0500
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=-0.5 required=5.0 tests=BAYES_05 autolearn=disabled
 version=3.3.2
Received: from fencepost.gnu.org ([2001:4830:134:3::e]:38081)
 by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <ludo@HIDDEN>)
 id 1gMwTl-0002KK-4U; Wed, 14 Nov 2018 09:49:17 -0500
Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=54506 helo=ribbon)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256)
 (Exim 4.82) (envelope-from <ludo@HIDDEN>)
 id 1gMwTk-0000jv-6n; Wed, 14 Nov 2018 09:49:17 -0500
From: ludo@HIDDEN (Ludovic =?utf-8?Q?Court=C3=A8s?=)
To: =?utf-8?Q?Cl=C3=A9ment?= Lassieur <clement@HIDDEN>
Subject: Re: bug#33370: guix publish: at least one user will have to build a
 given substitute
References: <87ftw4wnc7.fsf@HIDDEN> <87in10km16.fsf@HIDDEN>
 <87muqcezci.fsf@HIDDEN>
X-URL: http://www.fdn.fr/~lcourtes/
X-Revolutionary-Date: 24 Brumaire an 227 de la =?utf-8?Q?R=C3=A9volution?=
X-PGP-Key-ID: 0x090B11993D9AEBB5
X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc
X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4  0CFB 090B 1199 3D9A EBB5
X-OS: x86_64-pc-linux-gnu
Date: Wed, 14 Nov 2018 15:49:14 +0100
In-Reply-To: <87muqcezci.fsf@HIDDEN> (=?utf-8?Q?=22Cl=C3=A9ment?=
 Lassieur"'s message of "Wed, 14 Nov 2018 11:18:53 +0100")
Message-ID: <877ehfg1ed.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
X-Received-From: 2001:4830:134:3::e
X-Spam-Score: -5.0 (-----)
X-Debbugs-Envelope-To: 33370
Cc: 33370 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -6.0 (------)

Hi,

Cl=C3=A9ment Lassieur <clement@HIDDEN> skribis:

> Ludovic Court=C3=A8s <ludo@HIDDEN> writes:
>
>> Hello,
>>
>> Cl=C3=A9ment Lassieur <clement@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 =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...

The way we=E2=80=99re doing things, there=E2=80=99s necessarily a delay (th=
e build time
plus some additional latency) between the moment and commit is pushed
and the moment the corresponding package is built.  Baking only adds a
very small latency.

>> 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?

That=E2=80=99s generally not possible because HTTP is supposedly synchronou=
s.
Also, =E2=80=98guix publish=E2=80=99 has a bunch of worker threads that pic=
k baking
tasks from a queue.  When the queue is empty and you asking for a
substitute of sed, it will take seconds to bake it; but when the queue
is already large and you=E2=80=99re asking for LibreOffice, it could take a=
 few
minutes.

For the intended use case, which is a build farm with many users,
optimizing for the first user makes little sense IMO.

Thanks,
Ludo=E2=80=99.




Information forwarded to bug-guix@HIDDEN:
bug#33370; Package guix. Full text available.

Message received at 33370 <at> debbugs.gnu.org:


Received: (at 33370) by debbugs.gnu.org; 14 Nov 2018 10:18:57 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Nov 14 05:18:56 2018
Received: from localhost ([127.0.0.1]:50996 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1gMsG8-0003bh-Mf
	for submit <at> debbugs.gnu.org; Wed, 14 Nov 2018 05:18:56 -0500
Received: from mail.lassieur.org ([83.152.10.219]:39486)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <clement@HIDDEN>) id 1gMsG6-0003bZ-SJ
 for 33370 <at> debbugs.gnu.org; Wed, 14 Nov 2018 05:18:55 -0500
Received: from newt (smtp.parrot.biz [62.23.167.188])
 by mail.lassieur.org (OpenSMTPD) with ESMTPSA id b5fd8329
 (TLSv1.2:ECDHE-RSA-CHACHA20-POLY1305:256:NO); 
 Wed, 14 Nov 2018 10:18:53 +0000 (UTC)
References: <87ftw4wnc7.fsf@HIDDEN> <87in10km16.fsf@HIDDEN>
User-agent: mu4e 1.0; emacs 26.1
From: =?utf-8?Q?Cl=C3=A9ment?= Lassieur <clement@HIDDEN>
To: Ludovic =?utf-8?Q?Court=C3=A8s?= <ludo@HIDDEN>
Subject: Re: bug#33370: guix publish: at least one user will have to build a
 given substitute
In-reply-to: <87in10km16.fsf@HIDDEN>
Date: Wed, 14 Nov 2018 11:18:53 +0100
Message-ID: <87muqcezci.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 33370
Cc: 33370 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Hi Ludo,

Ludovic Court=C3=A8s <ludo@HIDDEN> writes:

> Hello,
>
> Cl=C3=A9ment Lassieur <clement@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 =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




Information forwarded to bug-guix@HIDDEN:
bug#33370; Package guix. Full text available.

Message received at 33370 <at> debbugs.gnu.org:


Received: (at 33370) by debbugs.gnu.org; 14 Nov 2018 10:10:07 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Nov 14 05:10:07 2018
Received: from localhost ([127.0.0.1]:50953 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1gMs7b-0003LJ-51
	for submit <at> debbugs.gnu.org; Wed, 14 Nov 2018 05:10:07 -0500
Received: from eggs.gnu.org ([208.118.235.92]:40012)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <ludo@HIDDEN>) id 1gMs7Z-0003Kd-De
 for 33370 <at> debbugs.gnu.org; Wed, 14 Nov 2018 05:10:05 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <ludo@HIDDEN>) id 1gMs7T-0005Xc-Cd
 for 33370 <at> debbugs.gnu.org; Wed, 14 Nov 2018 05:10:00 -0500
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=-0.5 required=5.0 tests=BAYES_05 autolearn=disabled
 version=3.3.2
Received: from fencepost.gnu.org ([2001:4830:134:3::e]:32982)
 by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <ludo@HIDDEN>)
 id 1gMs7T-0005XY-9k; Wed, 14 Nov 2018 05:09:59 -0500
Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=54106 helo=ribbon)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256)
 (Exim 4.82) (envelope-from <ludo@HIDDEN>)
 id 1gMs7T-0004OB-2E; Wed, 14 Nov 2018 05:09:59 -0500
From: ludo@HIDDEN (Ludovic =?utf-8?Q?Court=C3=A8s?=)
To: =?utf-8?Q?Cl=C3=A9ment?= Lassieur <clement@HIDDEN>
Subject: Re: bug#33370: guix publish: at least one user will have to build a
 given substitute
References: <87ftw4wnc7.fsf@HIDDEN>
Date: Wed, 14 Nov 2018 11:09:57 +0100
In-Reply-To: <87ftw4wnc7.fsf@HIDDEN> (=?utf-8?Q?=22Cl=C3=A9ment?=
 Lassieur"'s message of "Wed, 14 Nov 2018 00:48:40 +0100")
Message-ID: <87in10km16.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
X-Received-From: 2001:4830:134:3::e
X-Spam-Score: -5.0 (-----)
X-Debbugs-Envelope-To: 33370
Cc: 33370 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -6.0 (------)

Hello,

Cl=C3=A9ment Lassieur <clement@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 =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.

For a single-user setup, I recommend not using =E2=80=98--cache=E2=80=99.

> 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 hacki=
sh: Cuirass
is the only place that can send a notification.)  Basically we=E2=80=99d ru=
n:

  cuirass --build-completion-hook=3D/some/program =E2=80=A6

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=E2=80=99d=
 bake
lots of things, even possibly things that nobody ever needs.

Thoughts?

Ludo=E2=80=99.




Information forwarded to bug-guix@HIDDEN:
bug#33370; Package guix. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 13 Nov 2018 23:48:58 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Nov 13 18:48:58 2018
Received: from localhost ([127.0.0.1]:50737 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1gMiQT-0005He-Pd
	for submit <at> debbugs.gnu.org; Tue, 13 Nov 2018 18:48:58 -0500
Received: from eggs.gnu.org ([208.118.235.92]:40582)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <clement@HIDDEN>) id 1gMiQS-0005HL-7U
 for submit <at> debbugs.gnu.org; Tue, 13 Nov 2018 18:48:56 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <clement@HIDDEN>) id 1gMiQM-00052K-1V
 for submit <at> debbugs.gnu.org; Tue, 13 Nov 2018 18:48:51 -0500
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=-0.0 required=5.0 tests=BAYES_40 autolearn=disabled
 version=3.3.2
Received: from lists.gnu.org ([2001:4830:134:3::11]:56948)
 by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32)
 (Exim 4.71) (envelope-from <clement@HIDDEN>)
 id 1gMiQL-00052E-V6
 for submit <at> debbugs.gnu.org; Tue, 13 Nov 2018 18:48:49 -0500
Received: from eggs.gnu.org ([2001:4830:134:3::10]:50180)
 by lists.gnu.org with esmtp (Exim 4.71)
 (envelope-from <clement@HIDDEN>) id 1gMiQK-0002g3-Ps
 for bug-guix@HIDDEN; Tue, 13 Nov 2018 18:48:49 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <clement@HIDDEN>) id 1gMiQF-0004zc-Ro
 for bug-guix@HIDDEN; Tue, 13 Nov 2018 18:48:48 -0500
Received: from mail.lassieur.org ([83.152.10.219]:35316)
 by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32)
 (Exim 4.71) (envelope-from <clement@HIDDEN>)
 id 1gMiQF-0004yq-Ke
 for bug-guix@HIDDEN; Tue, 13 Nov 2018 18:48:43 -0500
Received: from rodion (88.191.118.83 [88.191.118.83])
 by mail.lassieur.org (OpenSMTPD) with ESMTPSA id 71fe4aaa
 (TLSv1.2:ECDHE-RSA-CHACHA20-POLY1305:256:NO) for <bug-guix@HIDDEN>;
 Tue, 13 Nov 2018 23:48:41 +0000 (UTC)
User-agent: mu4e 1.0; emacs 26.1
From: =?utf-8?Q?Cl=C3=A9ment?= Lassieur <clement@HIDDEN>
To: Bug Guix <bug-guix@HIDDEN>
Subject: guix publish: at least one user will have to build a given substitute
Date: Wed, 14 Nov 2018 00:48:40 +0100
Message-ID: <87ftw4wnc7.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Received-From: 2001:4830:134:3::11
X-Spam-Score: -4.1 (----)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -5.1 (-----)

Hi,

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.)

I was reluctant to send this email to bug-guix@HIDDEN because it's
fairly well documented, but I don't like this behaviour...  As a matter
of fact I'm often the first user downloading substitutes on my 'guix
publish' server.

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.)

Cheers,
Cl=C3=A9ment

--8<---------------cut here---------------start------------->8---
=E2=80=98--cache=3DDIRECTORY=E2=80=99
=E2=80=98-c DIRECTORY=E2=80=99
     Cache archives and meta-data (=E2=80=98.narinfo=E2=80=99 URLs) to DIRE=
CTORY and
     only serve archives that are in cache.

     When this option is omitted, archives and meta-data are created
     on-the-fly.  This can reduce the available bandwidth, especially
     when compression is enabled, since this may become CPU-bound.
     Another drawback of the default mode is that the length of archives
     is not known in advance, so =E2=80=98guix publish=E2=80=99 does not ad=
d a
     =E2=80=98Content-Length=E2=80=99 HTTP header to its responses, which i=
n turn
     prevents clients from knowing the amount of data being downloaded.

     Conversely, when =E2=80=98--cache=E2=80=99 is used, the first request =
for a store
     item (via a =E2=80=98.narinfo=E2=80=99 URL) returns 404 and triggers a=
 background
     process to =E2=80=9Cbake=E2=80=9D the archive=E2=80=94computing its =
=E2=80=98.narinfo=E2=80=99 and
     compressing the archive, if needed.  Once the archive is cached in
     DIRECTORY, subsequent requests succeed and are served directly from
     the cache, which guarantees that clients get the best possible
     bandwidth.

     The =E2=80=9Cbaking=E2=80=9D process is performed by worker threads.  =
By default,
     one thread per CPU core is created, but this can be customized.
     See =E2=80=98--workers=E2=80=99 below.

     When =E2=80=98--ttl=E2=80=99 is used, cached entries are automatically=
 deleted when
     they have expired.
--8<---------------cut here---------------end--------------->8---




Acknowledgement sent to Clément Lassieur <clement@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-guix@HIDDEN. Full text available.
Report forwarded to bug-guix@HIDDEN:
bug#33370; Package guix. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Wed, 14 Nov 2018 15:45:01 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.