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 ms0.migadu.com with LMTPS id gEWmNDYuJWIP0gAAgWs5BA (envelope-from ) for ; Sun, 06 Mar 2022 22:57:10 +0100 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 mKpoMTYuJWIKiAAAauVa8A (envelope-from ) for ; Sun, 06 Mar 2022 22:57:10 +0100 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 98144D9F2 for ; Sun, 6 Mar 2022 22:57:10 +0100 (CET) Received: from localhost ([::1]:45228 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nQysH-0000G1-Kn for larch@yhetil.org; Sun, 06 Mar 2022 16:57:09 -0500 Received: from eggs.gnu.org ([209.51.188.92]:37542) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nQysA-0000Fa-W7 for guix-patches@gnu.org; Sun, 06 Mar 2022 16:57:03 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:58010) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nQysA-0004Pk-Mj for guix-patches@gnu.org; Sun, 06 Mar 2022 16:57:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nQysA-0001kG-MF for guix-patches@gnu.org; Sun, 06 Mar 2022 16:57:02 -0500 Subject: bug#54241: [PATCH 0/4] 'github' importer gracefully handles rate limiting Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-To: guix-patches@gnu.org Resent-Date: Sun, 06 Mar 2022 21:57:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: cc-closed 54241 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Maxime Devos Cc: 54241-done@debbugs.gnu.org Mail-Followup-To: 54241@debbugs.gnu.org, ludo@gnu.org, ludo@gnu.org Received: via spool by 54241-done@debbugs.gnu.org id=D54241.16466037636609 (code D ref 54241); Sun, 06 Mar 2022 21:57:02 +0000 Received: (at 54241-done) by debbugs.gnu.org; 6 Mar 2022 21:56:03 +0000 Received: from localhost ([127.0.0.1]:51902 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nQyrD-0001iX-20 for submit@debbugs.gnu.org; Sun, 06 Mar 2022 16:56:03 -0500 Received: from eggs.gnu.org ([209.51.188.92]:59898) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nQyrC-0001i2-8S for 54241-done@debbugs.gnu.org; Sun, 06 Mar 2022 16:56:02 -0500 Received: from [2001:470:142:3::e] (port=58058 helo=fencepost.gnu.org) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nQyr6-0004GN-GI; Sun, 06 Mar 2022 16:55:56 -0500 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=WyJcQQa7Or3esmyjZzqNXrsUzEne8w3GHeTQdqzGV4k=; b=HUmr4LvOknHWHTEGov2W KITLaNO1APlxaQd+2jWBpqEBcsV8krbJI4EW8hNlplzaSZeCu76ukIjKIRTHEtJCp+zK0LGYVVjaw KtyjdPaG917mYuDM8nCV8zmvC+21tqmUN9BalSllJ8w8L4KwppZERHwz4nrIFTe3aaHgRIHv1oC7c rgfs/2q1zt3x09O9AjCUh4mxN2y0Smzg8gpPjX6dnlONLhc+ceyxhbVYv0nxPTfvXfCux58A3EoEk 9SHNISkb7Q8+vEoeBKHtkso4GARXCTkFN5cdAp4U5eu7jP6GDVSw8gju7tUzDgjYQrhXKsy6GBTww C66J2Bo4YvbzXQ==; Received: from 91-160-117-201.subs.proxad.net ([91.160.117.201]:50164 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nQyr6-0007vJ-2j; Sun, 06 Mar 2022 16:55:56 -0500 From: Ludovic =?UTF-8?Q?Court=C3=A8s?= References: <20220303211444.19928-1-ludo@gnu.org> <20220303211444.19928-3-ludo@gnu.org> <69a48935f3f03ad72ac49eb7b529cf10eb7db96e.camel@telenet.be> Date: Sun, 06 Mar 2022 22:55:53 +0100 In-Reply-To: <69a48935f3f03ad72ac49eb7b529cf10eb7db96e.camel@telenet.be> (Maxime Devos's message of "Fri, 04 Mar 2022 13:39:05 +0100") Message-ID: <875yoqiw46.fsf_-_@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (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-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1646603830; 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-to: 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=WyJcQQa7Or3esmyjZzqNXrsUzEne8w3GHeTQdqzGV4k=; b=Cfcjwr+ZeBJxExk0cXC7G3UALv6lf6V+Ie98s9ZvQWCoDHe4qVi7fb5cERZofZNGnA/7kr GSGiAd8TyrCl3aaxqQtkV8qsWXCesZ7YKdtuOD136X1z3bxd1RHMl8KLkuiv2l8AMB0O1P NE6pXk5C58LU8AuzqnaCIQCaSdENme4ICrIgXEN8bP3uaxKNEuNnsdgvHll5j7Dj7XkPeZ H5IdxYjykoRibBXpxeRnd2k8DaRdq/4LAn1EacWAEa19e1OCg7K6TgsLKoPdI02laGdWtk iGOAg07yvo7G8NR97Xme6S0Bx9hqLgCuuq6ZgfgB/sVjMovvibWT2StU/j4lAA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1646603830; a=rsa-sha256; cv=none; b=XEEB+1dHYz8uAsCqAxkbRXVNjEnyHNCUDRxGHBAFaxn+2zkoRAR3LX3yh8uJHMTYK9Bwsc IBH6fZw8PlsIFb4cZCL1bq07u8DfdWXc/boGXprUSkLZeqk5QOrwlp+b44twFI+/R2cU9Z z0I0DFDPkQyWX6r3rFAV50hdG3Hphzvd1o/3kTFCGc3TDmH/eLRvDv0IWp1xxa6I0/jxdp E0J7OTQ6GEQI9/r/XvX0/+58ZkCSYQtzitLsPVI9WuvyYpw1DF8PABprMsc7pu6gekQTqZ lrdEczOndPhJTJPFjXIx1gNsNPN66ZTkgHgMzrwntUkB+rIadgFSIiiTxkf7jw== 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=HUmr4LvO; 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: -4.63 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b=HUmr4LvO; 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: 98144D9F2 X-Spam-Score: -4.63 X-Migadu-Scanner: scn0.migadu.com X-TUID: E/cfKIvQHShB Hello, I committed an updated version of these patches, taking some of your suggestions into account: a8d3033da6 import: github: Reuse HTTP connection for the /tags URL fallba= ck. 8786c2e8d7 http-client: Correctly handle redirects when #:keep-alive? #t. 55e8e283ae import: github: Gracefully handle rate limit exhaustion. ecad9b2213 http-client: Add response headers to '&http-get-error'. 049aefddb2 tests: Add (guix http-client) tests. The first patch adds tests for =E2=80=98http-fetch=E2=80=99, as you suggest= ed, which allowed me to find a thinko in the keep-alive patch. The test doesn=E2=80= =99t test keep-alive support though, because the server in (guix tests http) doesn=E2=80=99t support it currently (I tried to retrofit it based on (web server http) but that=E2=80=99s not really possible because we=E2=80=99d ne= ed to either access internals of the record type, specifically it=E2=80=99s poll = set, or re-implement it entirely.) Thanks a lot for your help! Ludo=E2=80=99.