From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id yAEhKcEWUWCbPAAA0tVLHw (envelope-from ) for ; Tue, 16 Mar 2021 20:36:17 +0000 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id GC7qJMEWUWCoWQAA1q6Kng (envelope-from ) for ; Tue, 16 Mar 2021 20:36:17 +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 5753C133C8 for ; Tue, 16 Mar 2021 21:36:17 +0100 (CET) Received: from localhost ([::1]:59958 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lMGQJ-00065q-Rs for larch@yhetil.org; Tue, 16 Mar 2021 16:36:15 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:41430) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lMGQ6-000651-C0 for guix-patches@gnu.org; Tue, 16 Mar 2021 16:36:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:57839) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lMGQ6-0001Wj-1x for guix-patches@gnu.org; Tue, 16 Mar 2021 16:36:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lMGQ5-0002tM-VA for guix-patches@gnu.org; Tue, 16 Mar 2021 16:36:01 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#47160] [PATCH] scripts: substitute: Add back some error handling. Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 16 Mar 2021 20:36:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 47160 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Christopher Baines Cc: 47160@debbugs.gnu.org Received: via spool by 47160-submit@debbugs.gnu.org id=B47160.161592690911052 (code B ref 47160); Tue, 16 Mar 2021 20:36:01 +0000 Received: (at 47160) by debbugs.gnu.org; 16 Mar 2021 20:35:09 +0000 Received: from localhost ([127.0.0.1]:41152 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lMGPF-0002sB-9r for submit@debbugs.gnu.org; Tue, 16 Mar 2021 16:35:09 -0400 Received: from eggs.gnu.org ([209.51.188.92]:48118) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lMGPB-0002rZ-TS for 47160@debbugs.gnu.org; Tue, 16 Mar 2021 16:35:08 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:47335) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lMGP6-0000tj-Dt; Tue, 16 Mar 2021 16:35:00 -0400 Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=44356 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1lMGP4-0002oW-FP; Tue, 16 Mar 2021 16:35:00 -0400 From: Ludovic =?UTF-8?Q?Court=C3=A8s?= References: <20210315151133.16282-1-mail@cbaines.net> <8735wwh29g.fsf@gnu.org> <874khcfl6j.fsf@cbaines.net> <87pn00b0p5.fsf_-_@gnu.org> <87k0q8drv8.fsf@cbaines.net> Date: Tue, 16 Mar 2021 21:34:56 +0100 In-Reply-To: <87k0q8drv8.fsf@cbaines.net> (Christopher Baines's message of "Mon, 15 Mar 2021 21:33:31 +0000") Message-ID: <87zgz27s7j.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-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 ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1615926977; 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; bh=szUX084VSdYw8WoCNXbGd073r1y+gRZWfHAyOaBzZAg=; b=PkY/FAFg5Kw4yBJL6/Isvz//wF7bOCN5JHSzT/agt9VM1aoS9y0Hzz9dOSt+8Ac3l+l4Iq F8U6CBaKKgVN/UjHpniLz6imFa5penUU0J+b06ZYcQgqP4EdHVqwoFiLifkQCFn2wGJR++ sm2gotIFXACJ0RUTBTmIkDhgYNJGPTJzogt8dFi3ujj0kliUr0qgFeNy/cB+AH26YFok9H AsEgPlcbZQwELe0zyxjGnAwBb9JKrAYjN+qcPtN0RkyLOlL1JjBpFxETyNGOVyKkj3LO22 rqxFIkp0na6HRozTtSd+te8aeuWn9NhD/hEJwOfHxmG+APu3EXol89Y03my5lQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1615926977; a=rsa-sha256; cv=none; b=RadTZI5De7a3qCI/Z2zO3enDCMr3cHsMAT5wl9lozaxYTjY2R6e2Jm0UyCJwkgIGt1HzAL GYs3TVqWFzG1SEx8lBGjZ5gHuffIGymyDnXZsC6WC3AfVdB1SpN2ROjZPf2oW4pdeWc/zw 26UIyK8wVJVk1UVw3xqfPaQSIRG/adtj7ql8MOwzuXwRuOjMVU8Q6nUVHOMr7fenIiZoMo Kr34ZijaNRvkrci4D9UpYOSqdqF2QdYODuKKsodm/b0sSe/IH3gQFIVhJRFLCjIWLPcPKH QRFLbIEQ8lahjirKJM97o3gvoSi5wjUr3TpID+yVUR/zGueSlgRcGre3QYayzw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=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-Migadu-Spam-Score: -2.90 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-Migadu-Queue-Id: 5753C133C8 X-Spam-Score: -2.90 X-Migadu-Scanner: scn0.migadu.com X-TUID: lRlzWcE1Dt+T Howdy! Christopher Baines skribis: > Ludovic Court=C3=A8s writes: [...] >> Though I=E2=80=99m still unsure what the patch series starting at >> 7b812f7c84c43455cdd68a0e51b6ded018afcc8e was about. What was the end >> goal? > > So that was part of the creation of the (guix substitutes) module, > unpicking the code in the script to separate out some of the connection > caching was a prerequisite (discussion starts here > https://issues.guix.gnu.org/45409#5 ). > > I think separating out that module is still a good thing. It's allowed > for improvements in guix, the weather script doesn't now call in to the > substitute script code for example. I'd also like the separation for > things like the Guix Build Coordinator, which currently attempts to use > the substitute code from Guix. Right, I agree this is a worthy goal. Untangling the stateful bits is the hard part, as we see. :-) >> I also wonder if it introduced other issues. For >> example, 7b812f7c84c43455cdd68a0e51b6ded018afcc8e replaced a reference >> to =E2=80=98open-connection-for-uri/cached=E2=80=99 by one to >> =E2=80=98open-connection-for-uri/maybe=E2=80=99. Are we still using cac= hed >> connections? > > At least on that commit, open-connection-for-uri/maybe calls > open-connection-for-uri/cached, so yes, still using cached connections. OK. >> Commit f50f5751fff4cfc6d5abba9681054569694b7a5c no longer passes the >> #:port parameter to =E2=80=98http-fetch=E2=80=99. > > Yeah, that change is sort of fine if you're just looking at how the > port/connection is handled, but that area is being fixed up here, and > because closing the port is something that happens, it's better to also > pass the port in. OK. >> Commit 20c08a8a45d0f137ead7c05e720456b2aea44402 does other things but at >> first sight I=E2=80=99m not sure what the effect is. > > So, open-connection-for-uri/maybe is like > open-connection-for-uri/cached, but it catches a couple of exceptions > relating to not being able to connect to a substitute server, it also > remembers about showing the messages. > > The second commit here is changing that slightly, to not apply to > process-substitution, however I do think that code might have applied in > the past (as open-connection-for-uri/maybe was used I believe). But I > think you're right in saying there's probably some overlap between the > error handling here and done by with-networking. Alright. >> If you=E2=80=99re confident we can move forward to fix the bug, that=E2= =80=99s great >> (though we=E2=80=99ll need a good deal of testing), but I=E2=80=99d stil= l like to >> clarify these points later on. > > Well, the changes I'm suggesting here seem reasonable to me. As for > testing, checking things basically work is easy enough, but I don't > currently have many ideas for how to test for when fetching things > doesn't go to plan (which can of course happen). I=E2=80=99ll do some testing of v2 on my end and report back. Thanks for the explanations! Ludo=E2=80=99.