From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms1.migadu.com with LMTPS id KD0xBXeRDWZkFgEA62LTzQ:P1 (envelope-from ) for ; Wed, 03 Apr 2024 19:27:19 +0200 Received: from aspmx1.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1.migadu.com with LMTPS id KD0xBXeRDWZkFgEA62LTzQ (envelope-from ) for ; Wed, 03 Apr 2024 19:27:19 +0200 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=none; 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"; dmarc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1712165239; 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: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; bh=O87kFtPQU5wkRy/yO3AJxQA/nx6rNRrS16qtpn5kC7o=; b=p+CHtlUG1VHjLPxWdE/t14KwajYMUHb6pzM4dbDC2dkjb8sDzv+vnKkjjmF3lVXkgCuodU cE/c/oJvG+GMUUUPReEEkBFerrhPsBxluASztvFJ1thVvDzwdygv5Hc9ccSsdy6BZJc9JE +Jp/OiESz7jowBL6+b3yp44GTwqc+5IueLWyack+bGKXS/2cXlWFfZwU0o5+aPTNjybhof AMQWSzMrrp6ivBRNbW050HNmRS5n8vNnYAmyh5lmHTapDTLEXB5wT9RrLvS3cPB8nIiCK/ mo3yfNHcKoARiaKOKxQtKjC3Z1HvSpAKySFJn9W0Gv7PA/kztC4NLsaQ+ZIT/g== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1712165239; a=rsa-sha256; cv=none; b=Zw242XKxSa3ZtMxyOsd0vapeZjT96cFPMh1pWOcZE+QsOMIYq9Tt2Ml/VAKBF/BJR4Q41j UBt46isWiBXG2nrJVzZc/wOA0PbqNuYnUW+NwDmO6Uqqdv6h+4SoqOVFoEGArG9uGKRKQb N6Dm/jvjTHefq8aDrK7/UqE3i+SjYkn4/dERdned8/rgXBfmXAxM6H/Gcw4irbmy9JhZY8 keXxjGEOW88fDNYwF4+WPjtqgBd5P2J2Q3H5kwwbjdwQsicCnwRAIOIpuf61urTCaCeYlp tbhkYbVMXwJqOjapEKnTtqM7OtysHXrfMCkHOPG1lCuX0O7VnJhGmV3P20jsYA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; 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"; dmarc=none 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 DB5B212D2F for ; Wed, 3 Apr 2024 19:27:18 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rs4O4-0007h9-I0; Wed, 03 Apr 2024 13:27:00 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rs4O1-0007gs-Ti for guix-patches@gnu.org; Wed, 03 Apr 2024 13:26:58 -0400 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rs4O1-0007SI-Kj for guix-patches@gnu.org; Wed, 03 Apr 2024 13:26:57 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rs4O5-0007HU-PV for guix-patches@gnu.org; Wed, 03 Apr 2024 13:27:01 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#69291] [PATCH 2/5] scripts: substitute: Allow not using with-timeout in download-nar. Resent-From: Christopher Baines Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 03 Apr 2024 17:27:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 69291 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Ludovic =?UTF-8?Q?Court=C3=A8s?= Cc: 69291@debbugs.gnu.org Received: via spool by 69291-submit@debbugs.gnu.org id=B69291.171216518227756 (code B ref 69291); Wed, 03 Apr 2024 17:27:01 +0000 Received: (at 69291) by debbugs.gnu.org; 3 Apr 2024 17:26:22 +0000 Received: from localhost ([127.0.0.1]:59435 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rs4NQ-0007DS-Pn for submit@debbugs.gnu.org; Wed, 03 Apr 2024 13:26:21 -0400 Received: from mira.cbaines.net ([212.71.252.8]:43296) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rs4NM-0007DF-3f for 69291@debbugs.gnu.org; Wed, 03 Apr 2024 13:26:19 -0400 Received: from localhost (unknown [212.132.255.10]) by mira.cbaines.net (Postfix) with ESMTPSA id D7AA427BBE2; Wed, 3 Apr 2024 18:26:10 +0100 (BST) Received: from felis (localhost.lan [127.0.0.1]) by localhost (OpenSMTPD) with ESMTP id d718ea08; Wed, 3 Apr 2024 17:26:10 +0000 (UTC) From: Christopher Baines In-Reply-To: <8734tjgnkt.fsf@gnu.org> ("Ludovic =?UTF-8?Q?Court=C3=A8s?="'s message of "Fri, 23 Feb 2024 17:19:46 +0100") References: <2bcc2278b5aefcd81fbc53b791d08622b6d93c7c.1708458147.git.mail@cbaines.net> <8734tjgnkt.fsf@gnu.org> User-Agent: mu4e 1.12.2; emacs 29.3 Date: Wed, 03 Apr 2024 18:26:08 +0100 Message-ID: <87wmpejr2n.fsf@cbaines.net> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" 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-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Spam-Score: -8.20 X-Spam-Score: -8.20 X-Migadu-Queue-Id: DB5B212D2F X-Migadu-Scanner: mx12.migadu.com X-TUID: v8HjHxFf6vLV --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Ludovic Court=C3=A8s writes: > Christopher Baines skribis: > >> I don't think the approach of using SIGALARM here for the timeout will w= ork >> well in all cases (e.g. when using Guile Fibers), so make it possible to= avoid >> this. >> >> * guix/scripts/substitute.scm (download-nar): Pass the fetch timeout in = as an >> option. >> >> Change-Id: I8cbe6cdfa10cdaa7d41974cbea56a95f5efecfe6 > > The patch LGTM. > > That said, maybe we should just pass #:timeout to =E2=80=98http-fetch=E2= =80=99? It=E2=80=99s > not strictly equivalent because it only controls the timeout on > connection establishment, but in practice it should have the same > effect. I haven't done that yet, but longer term I do want to make more changes here. In particular, I think the way to go regarding timeouts is to use Guile suspendable ports and have the read/write waiters handle the timeout. The build coordinator does this [1], it's quite similar to what is happening with the http-fetch timeout in connect*, but it's compatible with fibers. 1: https://git.savannah.gnu.org/cgit/guix/build-coordinator.git/tree/guix-b= uild-coordinator/utils/fibers.scm#n473 --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQKlBAEBCgCPFiEEPonu50WOcg2XVOCyXiijOwuE9XcFAmYNkTBfFIAAAAAALgAo aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldDNF ODlFRUU3NDU4RTcyMEQ5NzU0RTBCMjVFMjhBMzNCMEI4NEY1NzcRHG1haWxAY2Jh aW5lcy5uZXQACgkQXiijOwuE9Xe5Jg//fpPob6caE6VA3e0war4+32itKvSmN/vj ze7PjwiJLK/5t1ZnpUHCrbGLbYux4uKhYET2eKDaCeshF/Wwccd160/UC5OuJ0vr Dxp49jR37AzC2sOGNTasWF14VItVpXLS6+fRGV1SOYuZYmX64rEkQo812VHHZgiJ bgHwtdSgchkjgiQRjq63xOjEY8smePVCDwdRZPA1XRv1OAT8tgcK3Q4xyvQbN65m KItU+rfz7ObcAn4Xo6oe/qU0dSlcozRGAsxCaEU3RSI7YHAElDG2qcOyhHogYRQ2 UyyhvxTDSrG4F/AKpPsnx6NM64jAAzbH0GEIe0nmeaOnPKLQMxfiBhlp1y/x3z3o /MwokDXQJaXEq/v/D9eYraVr1vkVcqzWSyc11KGFZsyGXw2viLvX9td1AiXZ/+VI wDHGJQ4X0gJRdIS4v7Ou9RfFv9ORZERVt95vL4gqtST2KHlf8419hn7ehURDIQIV 8nSPl6JU5A1VREG7aETEBX2QQQsRKdj7Fhkln/uPJsMPupNGsXh91S3j723nXLWB xKyQJr7K88jN1ODfiUbTM8DoxlZkpBIaJ4qKiymZjKgbKvHAvbjxVgjeZcZ7jVLN 3EGgwTGSgo0+y4OiHu3S2CrKHWEj7i/P59AUPVUbLI/YHXUZqPILQVWt13g9GqhW QEpePhJmp0k= =Ug3X -----END PGP SIGNATURE----- --=-=-=--