From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id oCyRKSsvL2MrhAEAbAwnHQ (envelope-from ) for ; Sat, 24 Sep 2022 18:24:11 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id mHx2KSsvL2MNFwEAauVa8A (envelope-from ) for ; Sat, 24 Sep 2022 18:24:11 +0200 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 7DE8B9E40 for ; Sat, 24 Sep 2022 18:24:11 +0200 (CEST) Received: from localhost ([::1]:36524 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oc7wo-0003qJ-Kd for larch@yhetil.org; Sat, 24 Sep 2022 12:24:10 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:45798) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oc7wi-0003oR-JJ for guix-patches@gnu.org; Sat, 24 Sep 2022 12:24:04 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:46024) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oc7wi-0001uS-B6 for guix-patches@gnu.org; Sat, 24 Sep 2022 12:24:04 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oc7wi-0003PR-5N for guix-patches@gnu.org; Sat, 24 Sep 2022 12:24:04 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#58017] [PATCH 2/2] substitute: Retry downloading when a nar is unavailable. Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 24 Sep 2022 16:24:04 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 58017 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Maxime Devos Cc: 58017@debbugs.gnu.org, 57978@debbugs.gnu.org, Attila Lendvai , zimoun Received: via spool by 58017-submit@debbugs.gnu.org id=B58017.166403659112949 (code B ref 58017); Sat, 24 Sep 2022 16:24:04 +0000 Received: (at 58017) by debbugs.gnu.org; 24 Sep 2022 16:23:11 +0000 Received: from localhost ([127.0.0.1]:45081 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oc7vq-0003Mj-JP for submit@debbugs.gnu.org; Sat, 24 Sep 2022 12:23:10 -0400 Received: from eggs.gnu.org ([209.51.188.92]:59944) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oc7vn-0003Lp-9v; Sat, 24 Sep 2022 12:23:08 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:43008) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oc7vi-0001nx-0I; Sat, 24 Sep 2022 12:23:02 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:In-Reply-To:Date:References:Subject:To: From; bh=l4tzOcvP/a+5KaASrZj0zNeEKMK0+WftwcbVLe+VOes=; b=GMqza6MuAtCP+zm05bNP NqGioZmwHtKEoKicf/OLDLGfrvvlThTH7jtEyyvFxTIuIVY3VLrF8yI0qy3MGmaAWQOAPIn+ZQ2hv QxqJQ2jVM1x5QlTHCXlqovo4q5cLpVlPcKHE6lxlcguIq04qb76zX8IR0q7jiOi3ZXcd8zghfK9zd lW6bniJSJ2S85wHpSe5up0bmvE1kxVnqZtrR86ZEzIVMAXvuygWBN7YQoNHo4KmsB2GatvJQ+DgMO 1owYtFLW/IJEdzwHDdhWV8iy2lJbFpDQMqgvj5fd9znXijiyY2kW/DPKXcjqx5UQlqRMfqG8I+4m8 04Hge1Qk0sW0pg==; Received: from 91-160-117-201.subs.proxad.net ([91.160.117.201]:54790 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oc7vh-0008Jl-Hs; Sat, 24 Sep 2022 12:23:01 -0400 From: Ludovic =?UTF-8?Q?Court=C3=A8s?= References: <20220923061957.5658-1-ludo@gnu.org> <20220923061957.5658-2-ludo@gnu.org> <46a88139-3994-71e5-1a78-398d6926ef88@telenet.be> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: Tridi 3 =?UTF-8?Q?Vend=C3=A9miaire?= an 231 de la =?UTF-8?Q?R=C3=A9volution,?= jour de la =?UTF-8?Q?Ch=C3=A2taigne?= 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: Sat, 24 Sep 2022 18:22:59 +0200 In-Reply-To: <46a88139-3994-71e5-1a78-398d6926ef88@telenet.be> (Maxime Devos's message of "Sat, 24 Sep 2022 03:57:33 +0200") Message-ID: <87a66o7ndo.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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-Migadu-Flow: FLOW_IN X-Migadu-To: larch@yhetil.org X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1664036651; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=l4tzOcvP/a+5KaASrZj0zNeEKMK0+WftwcbVLe+VOes=; b=T3LW9BXKdr8qfAt7FjfMJrd+6Zbq2FNSAdyDCJa6CiCQGWvCOpt/WcbHKmIqyAwFR9Nfho cdALi3D2CUVKtjwKfEqvGAl485Q/D1hTYRa7Gi/g8GqCtOSnLY3+IpIu03uS/RpKDuCI91 CBWmaaqtFuoYYWxf9dZkCpDKCz+Bs12bjdZm1Hu93OOefv/vc/eCeuICqf98Q9chJDuhgr U6p2Gqc7sdYjip22SB7vnA1U31ccAAAHmO+8CdGigZmtqCKvI/dhOJ1TQ7+9PVC23Y3u9Z iuGU6uwuK12IS+L7wsTnYu0t4FBCaQEQM0zQEqqov9VdmtVMIYQmDnwyISyjlw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1664036651; a=rsa-sha256; cv=none; b=u+ilm0FV+lv1wWG/G5tiDQmDyTe5FKWGCL326PO21HnjyfVGgpRBKZFbX3PIa+0VjZf750 SstJVDjpmaLW692ViRhH190EAcVpAJ5li/E6vquBUgcBPzCE6AIjPOFhGfAIfEhC+aTymV TJuEehxmd5g7eGVUulLo729sHUJRHSkfxPWVf1pXZAQ/fpi1dqdGrfkbVopU3dD85QFuTv wcOgcNl5FoJ2lzpwAdKDbowpd+AN3Ri5Eh/AOcSUMIGvEB+blKXoFdrZjLiVnimexK+aSA CMSJKvtyHdMfR/BMSv65RmpaxCF8HuNQPegC1TlY3YrC6WsVkMKvYPz86De2JQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b=GMqza6Mu; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: -0.76 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b=GMqza6Mu; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: 7DE8B9E40 X-Spam-Score: -0.76 X-Migadu-Scanner: scn1.migadu.com X-TUID: 4/pcmKX2n3JR Hi Maxime, Maxime Devos skribis: >> +(test-equal "substitute, first URL has narinfo but nar is 404, both URL= s authorized" >> + "Substitutable data." >> + (with-narinfo* >> + (string-append %narinfo "Signature: " >> + (signature-field %narinfo)) >> + %main-substitute-directory >> + >> + (with-http-server `((200 ,(string-append %narinfo "Signature: " >> + (signature-field %narinfo)= )) >> + (404 "Sorry, nar is missing!")) >> + (dynamic-wind >> + (const #t) >> + (lambda () >> + (parameterize ((substitute-urls >> + (list (%local-url) >> + (string-append "file://" >> + %main-substitute-directo= ry)))) >> + (request-substitution (string-append (%store-prefix) >> + "/aaaaaaaaaaaaaaaaaaaa= aaaaaaaaaaaa-foo") >> + "substitute-retrieved")) >> + (call-with-input-file "substitute-retrieved" get-string-all)) >> + (lambda () >> + (false-if-exception (delete-file "substitute-retrieved"))))))) > > Shouldn't it only ignore 'file not found' (ENOENT?) exceptions? By =E2=80=9Cit=E2=80=9D, do you mean =E2=80=98dynamic-wind=E2=80=99 should = be replaced by a =E2=80=98catch=E2=80=99 form? We could discuss it, but note that this patch just keeps with the style of existing tests. > This test, and some others, can be improved by also checking the > URI. While currently 'with-http-server' does not support that, there > are (5 months, with the v1 having seen some reviewing and a v2 > available) patches for that at . > > That patch also _requires_ always mentioning the URI, if the cover > letter is correct. It also allows simplifying the use of '%local-url' > a bit. Ah, thanks for the reminder! I=E2=80=99ve just spent most of the day revie= wing patches, but not that one=E2=80=A6 Ludo=E2=80=99.