From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:40881) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cyxwY-0007FX-5P for guix-patches@gnu.org; Fri, 14 Apr 2017 05:55:07 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cyxwU-0006Nl-3U for guix-patches@gnu.org; Fri, 14 Apr 2017 05:55:06 -0400 Received: from debbugs.gnu.org ([208.118.235.43]:48272) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cyxwU-0006NP-0P for guix-patches@gnu.org; Fri, 14 Apr 2017 05:55:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1cyxwT-0002im-NT for guix-patches@gnu.org; Fri, 14 Apr 2017 05:55:01 -0400 Subject: bug#26489: [PATCH] substitute: Ignore bad responses. Resent-Message-ID: From: ludo@gnu.org (Ludovic =?UTF-8?Q?Court=C3=A8s?=) References: <20170414002755.32672-1-me@tobias.gr> Date: Fri, 14 Apr 2017 11:54:32 +0200 In-Reply-To: <20170414002755.32672-1-me@tobias.gr> (Tobias Geerinckx-Rice's message of "Fri, 14 Apr 2017 02:27:55 +0200") Message-ID: <87lgr3gvqf.fsf@gnu.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: Tobias Geerinckx-Rice Cc: 26489@debbugs.gnu.org Howdy! Tobias Geerinckx-Rice skribis: > * guix/scripts/substitute.scm (http-multiple-get): Catch BAD-RESPONSE > exceptions and keep going. > --- > > Guix, > > One weird HTTP response from a server will kill =E2=80=98guix substitute= =E2=80=99: > > updating list of substitutes from 'https://foo'... 50.0%Backtrace: > ... > guix/ui.scm:1229:8: In procedure run-guix-command: > guix/ui.scm:1229:8: Throw to key `bad-response' with args > `("Bad Response-Line: ~s" (""))'. > error: build failed: substituter `substitute' died unexpectedly > > Attached is a patch to ignore such bad responses. The offending .narinfo > will be ignored for that session, and not cached at all. The result: I=E2=80=99m sure you expect this question: what bad responses did you get in practice? :-) Usually that is a sign of a broken HTTP server. Of course it=E2=80=99s widespread enough, we=E2=80=99d better handle it, either in Guix or directl= y in (web client) in Guile; OTOH, if it=E2=80=99s a genuine problem, we=E2=80=99= d better not hide it. Thanks, Ludo=E2=80=99.