From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id iPRsB2/hI2ILIQEAgWs5BA (envelope-from ) for ; Sat, 05 Mar 2022 23:17:19 +0100 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id kHllO27hI2KEdAEAG6o9tA (envelope-from ) for ; Sat, 05 Mar 2022 23:17:18 +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 9B30E1E694 for ; Sat, 5 Mar 2022 23:17:18 +0100 (CET) Received: from localhost ([::1]:57248 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nQciD-0004oC-Il for larch@yhetil.org; Sat, 05 Mar 2022 17:17:17 -0500 Received: from eggs.gnu.org ([209.51.188.92]:49612) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nQchy-0004mz-1H for guix-patches@gnu.org; Sat, 05 Mar 2022 17:17:02 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:55393) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nQchx-0005Fq-On for guix-patches@gnu.org; Sat, 05 Mar 2022 17:17:01 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nQchx-0004Lv-Kd for guix-patches@gnu.org; Sat, 05 Mar 2022 17:17:01 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#54241] [PATCH 0/4] 'github' importer gracefully handles rate limiting Resent-From: Maxime Devos Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 05 Mar 2022 22:17:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 54241 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Ludovic =?UTF-8?Q?Court=C3=A8s?= Cc: 54241@debbugs.gnu.org Received: via spool by 54241-submit@debbugs.gnu.org id=B54241.164651856714023 (code B ref 54241); Sat, 05 Mar 2022 22:17:01 +0000 Received: (at 54241) by debbugs.gnu.org; 5 Mar 2022 22:16:07 +0000 Received: from localhost ([127.0.0.1]:49289 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nQch5-0003dt-B4 for submit@debbugs.gnu.org; Sat, 05 Mar 2022 17:16:07 -0500 Received: from baptiste.telenet-ops.be ([195.130.132.51]:56030) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nQch3-0003c7-Ck for 54241@debbugs.gnu.org; Sat, 05 Mar 2022 17:16:05 -0500 Received: from ptr-bvsjgyhxw7psv60dyze.18120a2.ip6.access.telenet.be ([IPv6:2a02:1811:8c09:9d00:3c5f:2eff:feb0:ba5a]) by baptiste.telenet-ops.be with bizsmtp id 2mG4270084UW6Th01mG40u; Sat, 05 Mar 2022 23:16:04 +0100 Message-ID: From: Maxime Devos Date: Sat, 05 Mar 2022 23:16:04 +0100 In-Reply-To: <87wnh8m4zw.fsf_-_@gnu.org> References: <20220303211444.19928-1-ludo@gnu.org> <20220303211444.19928-2-ludo@gnu.org> <5ddbea58affe4bdb9a8c8d138bb25ccac9aca65c.camel@telenet.be> <87wnh8m4zw.fsf_-_@gnu.org> Content-Type: multipart/signed; micalg="pgp-sha512"; protocol="application/pgp-signature"; boundary="=-8crGG47xShQud94oHg+n" User-Agent: Evolution 3.38.3-1 MIME-Version: 1.0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r22; t=1646518564; bh=keOs7amHy1dw8EAY74ZreQr/Q6jWvJFSKxJZ4cgo7Vk=; h=Subject:From:To:Cc:Date:In-Reply-To:References; b=dcF+lc6R3cDgdtdMqfr62UWZRfIA3ODi22OSU+B6LbH2KDsZklhublcZlraCe6jeI xTrldPxPryzEMllPwjl/qBe8U9QDthvAWzVsJujfamxWnvbT3QavXlY1e4xb24bloJ hqAVycg3Xdp6hJzxvWw9JR70E/Bu4dOJIszQ5LkopSqlL2wLpHopmF2VW968kDh9ns BoNf+Ljb2emywTgT4D5DQCxrNY1YMdLjDBCvagAPLCzhZ8vvuwlahTyJLOHn0mHI9j mS5S8Z5wMadE+/oLRdnaQFRWwbtVj0Ji+ID+KkxM0P6BcAyX0wKjK7P8YvG8wyClIT xmK7Za9yKliRQ== 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=1646518638; 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: dkim-signature; bh=keOs7amHy1dw8EAY74ZreQr/Q6jWvJFSKxJZ4cgo7Vk=; b=jART1Cqryza1ExLklVmW+Qlj8t22rL0+1tTqxJcW1iYZRQDeuHUAx7i5AhvVidmAOEbHn3 8LWaPov47WZU+2xI0xNxbRFYng/7VHNOkBhHYSa++25/qsfoDdupv99S78TS/cZdvD8DiG 5r4WqddvvNooOxwrCjgH2Q6H5EZJZJDPKNi54/S21dXn76qEKtQWZC+RdcEV++OCjG7nRI Kj6LblaP2ngDiTelI2xRblDnuGR8nRKFK/eaUsrc49AA5WvQWKxt6p0NkQ97/yfal2T5Xb do6KHs0L6hohIlXYUbmDloYlnzlkMWdq80dWANlyTSMA0/q26Ph9x1KnyJDP/g== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1646518638; a=rsa-sha256; cv=none; b=Zi9WsE/AdmUwQD6HLX3sRApteuRrDFEy0mE4v82lFOYJTu1OSe1xH/fqnnKzkRmWX2n6BY KQf9BiTnDA8gwMxPq9nWHi26E1m3v+StuDzRVYTmX1AwsTUlSEVS9VFZO8XnxY8Owzg5Au N4ci3V4x2OmFc+iKZSsobyb1eTcAx5gCimq0mgkp2QHi3cKeU5duvZoj4ULF40GymRYGr/ XllWtvlvaQduVCEcOf7O4Jhga+vYg4yPvcFSobkt674EpArT+KFConFHfOtAyfgtFrAaip p1jveu20bjiKQAqniq+BD14RF5Vg/2sJFoXpEcfbAEfXZpMt2Lyp/y1gRuMaqA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=telenet.be header.s=r22 header.b=dcF+lc6R; dmarc=fail reason="SPF not aligned (relaxed)" header.from=telenet.be (policy=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: 3.16 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=telenet.be header.s=r22 header.b=dcF+lc6R; dmarc=fail reason="SPF not aligned (relaxed)" header.from=telenet.be (policy=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: 9B30E1E694 X-Spam-Score: 3.16 X-Migadu-Scanner: scn0.migadu.com X-TUID: SwCPvHZCi7f3 --=-8crGG47xShQud94oHg+n Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Ludovic Court=C3=A8s schreef op za 05-03-2022 om 23:03 [+0100]: > I don=E2=80=99t know if it=E2=80=99s supposed to happen.=C2=A0 It=E2=80= =99s defensive programming: > better keep going than crash if the server starts behaving slightly > differently. That's called total programming I think? From a OOP I'm following: * total: handle all cases without complaints (no throwing exceptions or such), assign every case a well-defined (and documented!) behaviour * nominal: document the preconditions, but don't bother checking them * defensive: check inputs, if they are wrong, throw an exception (it was probably formulated a bit differently but that was the gist of it) At least according to this classification, this 'update-rate-limit-reset-time!' would be total (except for the lack of documentation), not defensive. Greetings, Maxime. --=-8crGG47xShQud94oHg+n Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYiPhJBccbWF4aW1lZGV2 b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7s2AAP90etfPQ3L09auXAbp+Kv+8/1Q/ euTM5+gp29o6M+AazQEAg66z8EnIYmmKIFYD2kEjEdmRm3R6auhhmIbgIpmiQwk= =/aVa -----END PGP SIGNATURE----- --=-8crGG47xShQud94oHg+n--