X-Loop: help-debbugs@HIDDEN Subject: bug#51726: SWH: =?UTF-8?Q?=E2=80=98lookup-origin-revision=E2=80=99?= can miss tags Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= <ludovic.courtes@HIDDEN> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> Resent-CC: zimon.toutoune@HIDDEN, bug-guix@HIDDEN Resent-Date: Tue, 09 Nov 2021 17:12:01 +0000 Resent-Message-ID: <handler.51726.B.163647787424999 <at> debbugs.gnu.org> Resent-Sender: help-debbugs@HIDDEN X-GNU-PR-Message: report 51726 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: 51726 <at> debbugs.gnu.org Cc: zimoun <zimon.toutoune@HIDDEN> X-Debbugs-Original-To: bug-guix@HIDDEN X-Debbugs-Original-Xcc: zimoun <zimon.toutoune@HIDDEN> Received: via spool by submit <at> debbugs.gnu.org id=B.163647787424999 (code B ref -1); Tue, 09 Nov 2021 17:12:01 +0000 Received: (at submit) by debbugs.gnu.org; 9 Nov 2021 17:11:14 +0000 Received: from localhost ([127.0.0.1]:35577 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1mkUeQ-0006V9-1v for submit <at> debbugs.gnu.org; Tue, 09 Nov 2021 12:11:14 -0500 Received: from lists.gnu.org ([209.51.188.17]:55340) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <ludovic.courtes@HIDDEN>) id 1mkUeK-0006Uw-RN for submit <at> debbugs.gnu.org; Tue, 09 Nov 2021 12:11:13 -0500 Received: from eggs.gnu.org ([209.51.188.92]:33320) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <ludovic.courtes@HIDDEN>) id 1mkUeK-0001si-Mz for bug-guix@HIDDEN; Tue, 09 Nov 2021 12:11:08 -0500 Received: from mail2-relais-roc.national.inria.fr ([192.134.164.83]:14664) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <ludovic.courtes@HIDDEN>) id 1mkUeG-0006Q9-5R for bug-guix@HIDDEN; Tue, 09 Nov 2021 12:11:08 -0500 IronPort-Data: A9a23:uPbQEa1HqMWfzSPydPbD5fdzkn2cJEfYwER7XOPLsXnJ02931zBTyWBOX2uAPf7cZmOgeNlzbI+1/BhSvJSAnN82QQE+nZ1PZyIT+JCdXbx1DW+pYnjMdpWbJK5fAnR3huDodKjYdVeB4EfyWlTdhSMkj/jRH+KtULSs1h1ZHmeIdg9w0HqPpMZp2uaEsfDha++8kYuaT//3YDdJ6BYoWo4g0J9vnTs01BjEVJz0iXRlDRxDlAe2e3D4l/vzL4npR5fzatE88uJX24/+IL+FEmPxp3/BC/u/k7zxdUtirrz6bFHI0yQOHfH73V4Y/nVaPqUTbZLwbW9TljmOgdF6jt5KqIasRBwBP6vWme1bXQMw/yRWZ/0XoOKdfBBTtuTWlSUqaUDEyehhSU4rPJ0w9eBqR2ZU+pQlxJolBvyYr7PvhevlEqw135tmdpGyepgCsGom1SveHf8qB5bOX833CRZj9G9Yrqhz8Tz2PKL1sQZSUSk= IronPort-HdrOrdr: A9a23:6PQXaKp47q/KH53/v6xw8NgaV5omeYIsimQD101hICG9E/bo8PxG+c5w6faaskdzZJhNo7C90cq7IE80l6QFg7X5VI3KNGLbUQCTXeRfBOXZslnd8u7FmtK1F50MT0GzMrLN5JFB4/rH3A== X-IronPort-AV: E=Sophos;i="5.87,220,1631570400"; d="scan'208";a="2890525" Received: from 91-160-117-201.subs.proxad.net (HELO ribbon) ([91.160.117.201]) by mail2-relais-roc.national.inria.fr with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 09 Nov 2021 18:11:00 +0100 From: Ludovic =?UTF-8?Q?Court=C3=A8s?= <ludovic.courtes@HIDDEN> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 19 Brumaire an 230 de la =?UTF-8?Q?R=C3=A9volution?= X-PGP-Key-ID: 0x090B11993D9AEBB5 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4 0CFB 090B 1199 3D9A EBB5 X-OS: x86_64-pc-linux-gnu Date: Tue, 09 Nov 2021 18:11:00 +0100 Message-ID: <87mtmdi7a3.fsf@HIDDEN> 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 Received-SPF: pass client-ip=192.134.164.83; envelope-from=ludovic.courtes@HIDDEN; helo=mail2-relais-roc.national.inria.fr X-Spam_score_int: -41 X-Spam_score: -4.2 X-Spam_bar: ---- X-Spam_report: (-4.2 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.3 (-) X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -2.3 (--) Quoting <https://lists.gnu.org/archive/html/guix-devel/2021-10/msg00291.html>: --8<---------------cut here---------------start------------->8--- > However, I get this: > > $ guix lint -c archival sway=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20 > gnu/packages/wm.scm:1527:5: sway@HIDDEN: scheduled Software Heritage archi= val Indeed, I=E2=80=99m getting that as well. Right now Sway=E2=80=99s origin refers to the =E2=80=9C1.5.1=E2=80=9D tag. I found the problem: scheme@(guile-user)> ,use(guix swh) scheme@(guile-user)> (lookup-origin-revision "https://github.com/swaywm/swa= y" "1.5.1") $2 =3D #f scheme@(guile-user)> (lookup-origin "https://github.com/swaywm/sway") $3 =3D #<<origin> visits-url: "https://archive.softwareheritage.org/api/1/o= rigin/https://github.com/swaywm/sway/visits/" type: #<unspecified> url: "ht= tps://github.com/swaywm/sway"> scheme@(guile-user)> (car (origin-visits $3)) $4 =3D #<<visit> date: #<date nanosecond: 490956 second: 6 minute: 45 hour:= 14 day: 29 month: 10 year: 2021 zone-offset: 0> origin: "https://github.co= m/swaywm/sway" url: "https://archive.softwareheritage.org/api/1/origin/http= s://github.com/swaywm/sway/visit/41/" snapshot-url: "https://archive.softwa= reheritage.org/api/1/snapshot/10ba0257e3290ce4504c2413f32b9358d72975d6/" st= atus: full number: 41> scheme@(guile-user)> (define s (visit-snapshot $4)) scheme@(guile-user)> ,pp (map branch-name (snapshot-branches s)) *** output flushed *** scheme@(guile-user)> (length (snapshot-branches s)) $6 =3D 1000 scheme@(guile-user)> (filter (lambda (b) (string-prefix? "refs/tags" (branch-name b))) (snapshot-branches s)) $7 =3D () scheme@(guile-user)> ,use(srfi srfi-1) scheme@(guile-user)> ,pp (take (snapshot-branches s) 10) $8 =3D (#<<branch> name: "refs/pull/2715/head" target-type: revision target= -url: "https://archive.softwareheritage.org/api/1/revision/2f258eff6fd2c89a= 94caa658c1ea22beb76d728a/"> #<<branch> name: "refs/pull/2713/head" target-type: revision target-url: "= https://archive.softwareheritage.org/api/1/revision/4e4898e90f4d9b721091137= a744deac335e73f12/"> #<<branch> name: "refs/pull/2712/head" target-type: revision target-url: "= https://archive.softwareheritage.org/api/1/revision/d129108cddc485299443d0b= 98c3bdf3f9839aa1c/"> #<<branch> name: "refs/pull/271/head" target-type: revision target-url: "h= ttps://archive.softwareheritage.org/api/1/revision/20cb390323b19dc0c767ba63= 925def7f51c31044/"> #<<branch> name: "refs/pull/2709/head" target-type: revision target-url: "= https://archive.softwareheritage.org/api/1/revision/426c33f4dc2515867a0d3b0= 4cb865d5cad091d10/"> #<<branch> name: "refs/pull/2708/head" target-type: revision target-url: "= https://archive.softwareheritage.org/api/1/revision/b1a0e95e8e6ecf66542cc62= e6109949de59afb5e/"> #<<branch> name: "refs/pull/2704/head" target-type: revision target-url: "= https://archive.softwareheritage.org/api/1/revision/6194a445d3b10e8afc96871= 2faccdd1d127a8beb/"> #<<branch> name: "refs/pull/2703/head" target-type: revision target-url: "= https://archive.softwareheritage.org/api/1/revision/f16529e2588f5e71d6777f4= c06dfb58b29308cd0/"> #<<branch> name: "refs/pull/2701/head" target-type: revision target-url: "= https://archive.softwareheritage.org/api/1/revision/baeb28ea6230ef9aa409ee5= 2abe208720120e45c/"> #<<branch> name: "refs/pull/270/head" target-type: revision target-url: "h= ttps://archive.softwareheritage.org/api/1/revision/a32cbb52ce81ee38d2928ba8= 73ff7fc182df8393/">) This snapshot has more than 1,000 branches, mostly =E2=80=98refs/pull=E2=80= =99 branches. But by default, the endpoint used by =E2=80=98visit-snapshot=E2=80=99 only = returns the first 1,000 branches, and then it=E2=80=99s up to the caller to use the pagination mechanism. It=E2=80=99s not implemented though! It turns out the =E2=80=98refs/tags= =E2=80=99 =E2=80=9Cbranches=E2=80=9D were not among the first thousand branches, so the code incorrectly thinks that the tag is missing. The solution is to implement pagination (yuk!), or to use an endpoint to look up a branch by name instead of using =E2=80=98snapshot-branches=E2=80= =99 (is there such an endpoint?). --8<---------------cut here---------------end--------------->8--- Ludo=E2=80=99.
Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.505 (Entity 5.505) Content-Type: text/plain; charset=utf-8 X-Loop: help-debbugs@HIDDEN From: help-debbugs@HIDDEN (GNU bug Tracking System) To: Ludovic =?UTF-8?Q?Court=C3=A8s?= <ludovic.courtes@HIDDEN> Subject: bug#51726: Acknowledgement (SWH: =?UTF-8?Q?=E2=80=98lookup-origin-revision=E2=80=99?= can miss tags) Message-ID: <handler.51726.B.163647787424999.ack <at> debbugs.gnu.org> References: <87mtmdi7a3.fsf@HIDDEN> X-Gnu-PR-Message: ack 51726 X-Gnu-PR-Package: guix Reply-To: 51726 <at> debbugs.gnu.org Date: Tue, 09 Nov 2021 17:12:01 +0000 Thank you for filing a new bug report with debbugs.gnu.org. This is an automatically generated reply to let you know your message has been received. Your message is being forwarded to the package maintainers and other interested parties for their attention; they will reply in due course. As you requested using X-Debbugs-CC, your message was also forwarded to zimoun <zimon.toutoune@HIDDEN> (after having been given a bug report number, if it did not have one). Your message has been sent to the package maintainer(s): bug-guix@HIDDEN If you wish to submit further information on this problem, please send it to 51726 <at> debbugs.gnu.org. Please do not send mail to help-debbugs@HIDDEN unless you wish to report a problem with the Bug-tracking system. --=20 51726: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D51726 GNU Bug Tracking System Contact help-debbugs@HIDDEN with problems
Received: (at control) by debbugs.gnu.org; 18 Nov 2021 14:04:59 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Thu Nov 18 09:04:59 2021 Received: from localhost ([127.0.0.1]:35239 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1mni27-0006tP-Hh for submit <at> debbugs.gnu.org; Thu, 18 Nov 2021 09:04:59 -0500 Received: from eggs.gnu.org ([209.51.188.92]:38170) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <ludo@HIDDEN>) id 1mni26-0006tA-P4 for control <at> debbugs.gnu.org; Thu, 18 Nov 2021 09:04:58 -0500 Received: from [2001:470:142:3::e] (port=50302 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 <ludo@HIDDEN>) id 1mni1u-0007iu-Er for control <at> debbugs.gnu.org; Thu, 18 Nov 2021 09:04:53 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:Subject:From:To:Date:in-reply-to: references; bh=PU/Cps/TQqdm3p3NcvJQSzG4zetrCt9Tekfa8w12kAc=; b=ehW0Rz69536ZtW q4VkHmPYtFfoGkb0/BBi1zxJe1uaaK+fKyzl4r6LmZvlpplNOMg4X9kdWmWsexTKtYwGNVe8nNKk5 RWwAnPJjus79Jh/Iz/zGnxbqQhKoTwjwee04HwmS9Di8OaHuz26AIpqueKm7OapSju0NZ66+GMMVc fLI/CfizOS88/HtMMpqyg5rc+NeaeFWTN9CJwEykm8XTY7aRi9qPBCVKz9CyXklUtn59Z+RG96PR+ LV77DTxzjTBmrJ+SAL550DsatfnMy5WsZZ8sEtIChMGSqrz+A4SIaAtWAmGPXZ6duL8Gw4D335eEz w1YTkRJZNc9excCCjp4w==; Received: from 91-160-117-201.subs.proxad.net ([91.160.117.201]:51832 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <ludo@HIDDEN>) id 1mni1t-0002mw-1s for control <at> debbugs.gnu.org; Thu, 18 Nov 2021 09:04:46 -0500 Date: Thu, 18 Nov 2021 15:04:43 +0100 Message-Id: <87o86hpnk4.fsf@HIDDEN> To: control <at> debbugs.gnu.org From: =?utf-8?Q?Ludovic_Court=C3=A8s?= <ludo@HIDDEN> Subject: control message for bug #51726 MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -3.3 (---) severity 51726 important quit
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997 nCipher Corporation Ltd,
1994-97 Ian Jackson.