From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id SPI0E2q2lV88OwAA0tVLHw (envelope-from ) for ; Sun, 25 Oct 2020 17:31:22 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id YKoED2q2lV8MFAAAB5/wlQ (envelope-from ) for ; Sun, 25 Oct 2020 17:31:22 +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 E0D6B940148 for ; Sun, 25 Oct 2020 17:31:21 +0000 (UTC) Received: from localhost ([::1]:39124 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kWjrU-0000md-Kk for larch@yhetil.org; Sun, 25 Oct 2020 13:31:20 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:41046) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kWjrC-0000mL-La for guix-patches@gnu.org; Sun, 25 Oct 2020 13:31:04 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:54271) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kWjrC-00014h-BG for guix-patches@gnu.org; Sun, 25 Oct 2020 13:31:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kWjrC-0000Vu-8Y for guix-patches@gnu.org; Sun, 25 Oct 2020 13:31:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#44193] [PATCH 0/1] 'guix publish --cache' can publish items not yet cached Resent-From: Miguel =?UTF-8?Q?=C3=81ngel?= Arruga Vivas Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 25 Oct 2020 17:31:02 +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: Ludovic =?UTF-8?Q?Court=C3=A8s?= Cc: 44193@debbugs.gnu.org Received: via spool by 44193-submit@debbugs.gnu.org id=B44193.16036470531398 (code B ref 44193); Sun, 25 Oct 2020 17:31:02 +0000 Received: (at 44193) by debbugs.gnu.org; 25 Oct 2020 17:30:53 +0000 Received: from localhost ([127.0.0.1]:37584 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kWjr2-0000Ly-JK for submit@debbugs.gnu.org; Sun, 25 Oct 2020 13:30:52 -0400 Received: from mail-wr1-f65.google.com ([209.85.221.65]:46436) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kWjr0-0000FB-D8 for 44193@debbugs.gnu.org; Sun, 25 Oct 2020 13:30:50 -0400 Received: by mail-wr1-f65.google.com with SMTP id n6so9882744wrm.13 for <44193@debbugs.gnu.org>; Sun, 25 Oct 2020 10:30:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-transfer-encoding; bh=1MIbPplSb9D7PLmS+2AgsfxbLPW/085+CI+2/DbrNSI=; b=XBlBKkpkg0KC2IOT0upa4GSAmfCxnkl74F4HuyZAxOcFMUINgez63Bf3XLC25Fmzz2 wueiM7lfZeDfBUtIA9MIThsZzigluYGDnX/IQCRWRYJ7RzgEIyrMmWJeooOStCBXTEZy sbF/EkHGuN0zxHFSnUpfZ+RstRUdfhAgYv6zlk7VDctCY6bbBYxUKF6Eo3XQ/dNy9DXS iNI/0EyTccx5UOxSjNSpBZv6hRHd2caXhLpBRlRsJiVcd5QihO+Wul9O6xRJFGKAT/vR J5N5siJMC3bo1Dqew8x8FzG6YGqzE694ND+ZAIzAuB8kR8vNRMEMAZqZH4ciU/sg7CNg xKUQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version:content-transfer-encoding; bh=1MIbPplSb9D7PLmS+2AgsfxbLPW/085+CI+2/DbrNSI=; b=RXl7SjCqXiFIN1ymOtSr8b5zpS0IWPYHaDyPGuqJ1YS9VriesnFIO5qhu4JsE6BKXz nMkGRvsVkiItj5Nkgt4rGMnNy/G2eMPiQZPp2MhlgxuqqqCh0Yr5y70SMwO9xmSZKyj+ 1wf4WVQa/XvXE3+tKxptvNW6a0bnUuNCnDNOTwgJ2Ui7HZnlMs5NT8UjafOyMJ6S161S LLAsHVt/xAlw+wz3FgZhC/9B8ZxGi4iMFCTa06YDNul3YBJOHghTXa/Go0EZxp7PmbHb 0AK6/7jYzsV3sVMZenQx9TUL4w1brfi8BWLlxpSvCNtd27XzX8LSh0UfoFTPskHzHssC hD/w== X-Gm-Message-State: AOAM530kpPKXfJrQUGwwF56NTN3SVRXAq6v3EBYwEMhXXv7W3FYrYQas 4czG58kxDFMNueICa5KH0h1F0GRxpaQEPQ== X-Google-Smtp-Source: ABdhPJyvNAzZA6aF84AqFM078EkYszIs2PtWbYdTshg8F+EdXBJc3HubH0SI7KmM2zCP28870CgZcQ== X-Received: by 2002:adf:f20f:: with SMTP id p15mr13795325wro.339.1603647043992; Sun, 25 Oct 2020 10:30:43 -0700 (PDT) Received: from unfall (218.139.134.37.dynamic.jazztel.es. [37.134.139.218]) by smtp.gmail.com with ESMTPSA id l1sm19751635wrb.1.2020.10.25.10.30.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 25 Oct 2020 10:30:43 -0700 (PDT) From: Miguel =?UTF-8?Q?=C3=81ngel?= Arruga Vivas References: <20201024144929.4529-1-ludo@gnu.org> <87v9ey5u2e.fsf@gmail.com> <87pn56dzdp.fsf@gnu.org> Date: Sun, 25 Oct 2020 18:30:41 +0100 In-Reply-To: <87pn56dzdp.fsf@gnu.org> ("Ludovic =?UTF-8?Q?Court=C3=A8s?="'s message of "Sun, 25 Oct 2020 17:49:38 +0100") Message-ID: <874kmiqkla.fsf@gmail.com> 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: 0.2 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-Spam-Score: -0.8 (/) 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=fail (rsa verify failed) header.d=gmail.com header.s=20161025 header.b=XBlBKkpk; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); 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: 0.09 X-TUID: nrnqj0hFTTfX Hi, Ludo! Ludovic Court=C3=A8s writes: > 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 40= 4, 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 = need to adapt > that first and then wait until some time has passed before =E2=80=98guix > publish=E2=80=99 can return 202. :-/ I see, it uses 'max-age from the http response only when it's a 404. Nonetheless, correct me if I'm wrong, the difference is 5 vs 10 minutes, so I don't think we should wait too much to upgrade both sides. :-) > I guess we can change (guix scripts substitute) with that in mind > already. WDYT? I fully agree with that. Adding 202 together with 404 would be enough as an start, wouldn't it? -------------------------------8<----------------------------- (cache-narinfo! url (hash-part->path hash-part) #f (if (or (=3D 404 code) (=3D 202 code)) ttl %narinfo-transient-error-ttl)) ------------------------------->8----------------------------- Happy hacking! Miguel