unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
From: "Clément Lassieur" <clement@lassieur.org>
To: 33370@debbugs.gnu.org
Subject: bug#33370: guix publish: at least one user will have to build a given substitute
Date: Wed, 14 Nov 2018 00:48:40 +0100	[thread overview]
Message-ID: <87ftw4wnc7.fsf@lassieur.org> (raw)

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@gnu.org 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ément

--8<---------------cut here---------------start------------->8---
‘--cache=DIRECTORY’
‘-c DIRECTORY’
     Cache archives and meta-data (‘.narinfo’ URLs) to DIRECTORY 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 ‘guix publish’ does not add a
     ‘Content-Length’ HTTP header to its responses, which in turn
     prevents clients from knowing the amount of data being downloaded.

     Conversely, when ‘--cache’ is used, the first request for a store
     item (via a ‘.narinfo’ URL) returns 404 and triggers a background
     process to “bake” the archive—computing its ‘.narinfo’ 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 “baking” process is performed by worker threads.  By default,
     one thread per CPU core is created, but this can be customized.
     See ‘--workers’ below.

     When ‘--ttl’ is used, cached entries are automatically deleted when
     they have expired.
--8<---------------cut here---------------end--------------->8---

             reply	other threads:[~2018-11-13 23:49 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-13 23:48 Clément Lassieur [this message]
2018-11-14 10:09 ` bug#33370: guix publish: at least one user will have to build a given substitute Ludovic Courtès
2018-11-14 10:18   ` Clément Lassieur
2018-11-14 14:49     ` Ludovic Courtès
2018-11-14 15:34       ` bug#33370: Cuirass: Trigger 'guix publish' baking Clément Lassieur
2020-11-30 22:15 ` Tobias Geerinckx-Rice via Bug reports for GNU Guix

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87ftw4wnc7.fsf@lassieur.org \
    --to=clement@lassieur.org \
    --cc=33370@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).