From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id KCqgNYZzeWKRAAEAbAwnHQ (envelope-from ) for ; Mon, 09 May 2022 22:03:18 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id WP26NYZzeWLLagAA9RJhRA (envelope-from ) for ; Mon, 09 May 2022 22:03:18 +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 78A2D29508 for ; Mon, 9 May 2022 22:03:18 +0200 (CEST) Received: from localhost ([::1]:55120 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1no9b8-0003fz-I9 for larch@yhetil.org; Mon, 09 May 2022 16:03:15 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:43918) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1no9aw-0003eT-3r for guix-patches@gnu.org; Mon, 09 May 2022 16:03:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:37408) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1no9av-0005qX-R2 for guix-patches@gnu.org; Mon, 09 May 2022 16:03:01 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1no9av-0006iP-Nq for guix-patches@gnu.org; Mon, 09 May 2022 16:03:01 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#55242] [PATCH 07/10] guix: import: go: More resilience wrt network errors; add logging. Resent-From: Attila Lendvai Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 09 May 2022 20:03:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 55242 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Maxime Devos Cc: 55242@debbugs.gnu.org Received: via spool by 55242-submit@debbugs.gnu.org id=B55242.165212653625755 (code B ref 55242); Mon, 09 May 2022 20:03:01 +0000 Received: (at 55242) by debbugs.gnu.org; 9 May 2022 20:02:16 +0000 Received: from localhost ([127.0.0.1]:59538 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1no9aC-0006hL-Hq for submit@debbugs.gnu.org; Mon, 09 May 2022 16:02:16 -0400 Received: from mail-4317.proton.ch ([185.70.43.17]:15427) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1no9a8-0006h3-Ly for 55242@debbugs.gnu.org; Mon, 09 May 2022 16:02:15 -0400 Date: Mon, 09 May 2022 20:02:01 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=lendvai.name; s=protonmail3; t=1652126525; bh=7C/NhPrZ4rAvFooa1vqJhV+yFtqP+THc1espafgIvz8=; h=Date:To:From:Cc:Reply-To:Subject:Message-ID:In-Reply-To: References:Feedback-ID:From:To:Cc:Date:Subject:Reply-To: Feedback-ID:Message-ID; b=L9b0F7k8h/mknRfMzUzu7l/xxSt9CHLo1h2VdMqI6nUDJF5sRcnlzlpWURsHbTuLT l09g7j2ZdagznvfZx3OD5pqLP/fXlEkVTw9uadbkbYJVM72ljY7DNZ2Jd4kqIL5gOS rGwiWdTksdmD1qJ54Y012WTf0AiOx9UJbTJgSy3AUDXF3n0bSi3xbqk8wL/rn4sYgp gLRVJrhOp9EIFMFxurxDc7M/I56vhGQ+bH4VZ5m81Q2pNShpBZgbHBQLI3RC+0E6e4 naXEmaWmSusToVVyQ0EiL2EeB9qV3fz1s5aGXKUdPn+GvQ6OwaOKjO4qD5pYcKP302 BtqU3Px7A16Cg== From: Attila Lendvai Message-ID: <5BVwkhUhKpe_HOgy_US9e5QdB8dwxw3ED31P1VUezGdevXB90Ea2-eh6s2iaiTfMpwITHe5Z-2BVNn5vHGcejoNCe3pkWP2bRWA9QRFmEhY=@lendvai.name> In-Reply-To: <91eb2af9b86d2491c9e9f9010b9e3cb2d05dd253.camel@telenet.be> References: <20220503114301.9524-2-attila@lendvai.name> <20220503114301.9524-7-attila@lendvai.name> <7974a00256e3ee153507f77d6b0a405473e9bbc4.camel@telenet.be> <76510182d505978ad41f5bff88bf7eee7c289558.camel@telenet.be> <91eb2af9b86d2491c9e9f9010b9e3cb2d05dd253.camel@telenet.be> Feedback-ID: 28384833:user:proton 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: , Reply-To: Attila Lendvai 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=1652126598; h=from:from:sender:sender:reply-to: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=7C/NhPrZ4rAvFooa1vqJhV+yFtqP+THc1espafgIvz8=; b=BQigBn24rQ+Qgx3WLNZqnUE3xwvp65pd7uHEhuZ3O6Z8tCxemIh3sRuTfaBl1Rguf00zDx 1bVjeJMwIzcpK3vsxTxpjsRuDu1gdALKl82SSPABhgHcy0LXtFvsHNYxa8aLSsBsVn1hv5 PSpbVp2lRd+0FN6UtujWazIct3Dm5uhRPxFKnP/o/NzLHLyXC2gIMmBHuNx8vB2Z1/kvp9 M2oDdrfq5yKUEKU1WR95h59Z4T4E2obizKWXnvImcxmlO49tTNSuBu9cmSGmvpJQ1e6MqY h9bHoj5yu5HvhMUGWzk747xRyUBdsMRcecZEAHVhiSSE8L0pi+uwTnoM0ATr6A== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1652126598; a=rsa-sha256; cv=none; b=im6+lxWTevdUMwzhloMGd1b06UISWwnuhQARrNtKlSeHcR0aaXF18FANooYdSyqOJKULf/ piVCiJMzvgC0oItA39uRezeyqqGCu+uuishgZBZlQynUbgqqyt0OItQx3rECbBMXeAci6O LTwwZ8t6OeSrdRadt0rMyCQAwyUbg8fVh60FYB2J3MTd3Fy7pmMQcOo8rdo+4HaVu3e41o Nx5jMaQejEqwjRUBYekg1pJRd3vyuf+gAA74xHc1ncWvQlREWPmCtiW0jH434ioQmX76Ld jlxrQe6x/vjVbeJS8G2j88fqcJnu6Bq7X8P5kbNMPpMmBBYcwQPPkOfbWX6xXw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=lendvai.name header.s=protonmail3 header.b=L9b0F7k8; dmarc=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" X-Migadu-Spam-Score: 0.20 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=lendvai.name header.s=protonmail3 header.b=L9b0F7k8; dmarc=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" X-Migadu-Queue-Id: 78A2D29508 X-Spam-Score: 0.20 X-Migadu-Scanner: scn0.migadu.com X-TUID: NBj0q2Gyuryh > Also, given that we appear to have a number of people effectively > maintaining the Go importer ("git log guix/import.go.scm" mentions a > few =E2=80=98Maxim Cournoyer=E2=80=99, =E2=80=98Ludovic Court=C3=A8s= =E2=80=99 =E2=80=98Xinglu Chen=E2=80=99 and =E2=80=98Sarah > Morgensen=E2=80=99, and more recently maybe you?) and I don't see any ope= n note that the list of people *using* the go importer is probably not all th= at much larger. > old Go importer bugs/patches on issues.guix.gnu.org, I don't think > we have to worry about the fact that the go importer bugs were not even reported into the issue tr= acker doesn't change much about the fact that i have experienced several pr= oblems when i first tried to recursively import a non-trivial go project (w= hich even included issues with http-fetch). it means that all those bug wer= e there, not hidden by exception handling, and yet they have *not* been rep= orted into the issue tracker. or to put it another way, i think there are just too many unverified assump= tions in this discussion about actual user behavior. my strategy in those s= ituations is to expose as much info as feasible, and let the users respond = intelligently to the situation. > 4. The Go importer has some kind of type error or such. > > This case looks like an actual bug to me, where I think that > catching the resulting exceptions is just sweeping things under > the rug, implicitly teaching other people that it's ok to just > ignore problems without making any attempt of fixing them or > reporting them. Vaguely similar to =E2=80=98broken windows=E2=80=99 > (https://en.wikipedia.org/wiki/Broken_windows_theory). note that this patch does not just catch errors, but handles them by emitti= ng useful information about them, and continues only after that. i consider silently swallowing errors a major sin (read: code that will cer= tainly eat up some portion of someone's life in the future). the only place where this patch silently swallows errors is in the extracti= on of descriprions and such, i.e. data that the user must review anyway. > Sure, for a single particular user and short term this makes the > importer a bit less useful, but knowing bugs is a prerequisite for > fixing them, and long term, by actually knowing about the bugs and > fixing them, more users will benefit. this patch does not hide any bugs, only enables the code to continue by ski= pping a package. and as a bonus: i wouldn't be surprised if it emitted *more* useful informa= tion than when allowing the exception to pass through to the caller, becaus= e error handling in the guix codebase could use a bit more love. > That said, like "guix build" has a "--keep-going" option to temporarily > ignore to some degree packages that fail to build, maybe "guix import" > (when using --recursive) can have a "--keep-going" option. ok, i'll look into putting this feature behind a CLI argument, and generali= ze it to all importers. as time allows i'll get back to the rest of the que= stions/suggestions, too. thanks for the feedback Maxime! -- =E2=80=A2 attila lendvai =E2=80=A2 PGP: 963F 5D5F 45C7 DFCD 0A39 -- =E2=80=9CA great civilization is not conquered from without until it destro= ys itself from within.=E2=80=9D =09=E2=80=94 Will Durant