From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id YOdbJcKslV9zMQAA0tVLHw (envelope-from ) for ; Sun, 25 Oct 2020 16:50:10 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id kHcxIcKslV84XwAAbx9fmQ (envelope-from ) for ; Sun, 25 Oct 2020 16:50:10 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 32E3A940148 for ; Sun, 25 Oct 2020 16:50:10 +0000 (UTC) Received: from localhost ([::1]:34510 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kWjDd-00025r-45 for larch@yhetil.org; Sun, 25 Oct 2020 12:50:09 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:33306) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kWjDW-00024w-Aw for guix-patches@gnu.org; Sun, 25 Oct 2020 12:50:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:54179) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kWjDW-0004SP-06 for guix-patches@gnu.org; Sun, 25 Oct 2020 12:50:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kWjDV-0006vh-U6 for guix-patches@gnu.org; Sun, 25 Oct 2020 12:50:01 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#44193] [PATCH 0/1] 'guix publish --cache' can publish items not yet cached Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 25 Oct 2020 16:50:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 44193 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Miguel =?UTF-8?Q?=C3=81ngel?= Arruga Vivas Cc: 44193@debbugs.gnu.org Received: via spool by 44193-submit@debbugs.gnu.org id=B44193.160364459826624 (code B ref 44193); Sun, 25 Oct 2020 16:50:01 +0000 Received: (at 44193) by debbugs.gnu.org; 25 Oct 2020 16:49:58 +0000 Received: from localhost ([127.0.0.1]:37492 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kWjDS-0006vL-GU for submit@debbugs.gnu.org; Sun, 25 Oct 2020 12:49:58 -0400 Received: from eggs.gnu.org ([209.51.188.92]:33152) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kWjDQ-0006v8-BI for 44193@debbugs.gnu.org; Sun, 25 Oct 2020 12:49:56 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:37398) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kWjDK-0004RH-U1; Sun, 25 Oct 2020 12:49:51 -0400 Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=57292 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1kWjDA-0007GT-38; Sun, 25 Oct 2020 12:49:44 -0400 From: Ludovic =?UTF-8?Q?Court=C3=A8s?= References: <20201024144929.4529-1-ludo@gnu.org> <87v9ey5u2e.fsf@gmail.com> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 4 Brumaire an 229 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: Sun, 25 Oct 2020 17:49:38 +0100 In-Reply-To: <87v9ey5u2e.fsf@gmail.com> ("Miguel =?UTF-8?Q?=C3=81ngel?= Arruga Vivas"'s message of "Sun, 25 Oct 2020 14:11:37 +0100") Message-ID: <87pn56dzdp.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-Spam-Score: -3.3 (---) X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Scanner: scn0 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Spam-Score: -1.51 X-TUID: 1RkhMJjPq72y Hi! Miguel =C3=81ngel Arruga Vivas skribis: > Ludovic Court=C3=A8s writes: >> Thus, the first narinfo request for an item would always return 404; >> one would have to wait until the item is baked to get 200 and download >> the substitute. > > I'd argue that returning unconditionally the 404 is a problem. If the > nar is getting baked, I guess that a 202[1] would be the appropriate > answer, and I'd leave the 404 for invalid store paths[2]. This way the > client could implement more policies: the classic timeout, but also, for > example, it might check other servers before checking once again if > nobody else has it, or directly wait until a 404 is reached. WDYT? Indeed, 202 seems more appropriate (and it=E2=80=99s precisely half of 404,= that tells something!). Unfortunately (guix scripts substitute) currently explicitly checks for 404 and 200 and considers anything else to be a transient error with a default TTL (in =E2=80=98handle-narinfo-response=E2=80=99). So we would ne= ed to adapt that first and then wait until some time has passed before =E2=80=98guix publish=E2=80=99 can return 202. :-/ I guess we can change (guix scripts substitute) with that in mind already. WDYT? Ludo=E2=80=99.