From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:306:2d92::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id KIkQOZMD3WSsSAAASxT56A (envelope-from ) for ; Wed, 16 Aug 2023 19:12:52 +0200 Received: from aspmx1.migadu.com ([2001:41d0:306:2d92::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id kE/7OJMD3WSnDQEAauVa8A (envelope-from ) for ; Wed, 16 Aug 2023 19:12:51 +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 9756A4841A for ; Wed, 16 Aug 2023 19:12:51 +0200 (CEST) Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20221208 header.b=i4Do5OT+; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (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" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1692205971; 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-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=y0JMZjBfGsQUzVWYf0kAQB1D1nZ/pGEvdlNpkE3l5Rk=; b=fOlUI7gXg/ysSaOtcjSIpDWlCL/woYX9DY9oHGleAg99ysldF1qTVHpzfqEEKVrIfbKczX pQk/Muw7dZuRFTOONLZjXOpAaJ3qKf9CsiOEBoVQLC/JXBe4o+BywWP77fYxTKCDxGVkuu syjjcIpuZnKpu5cA6umyURn6Q7foW7U8L4pLeqeusf+b0r3/lXJmFItorN7Y7B+H/IBHvU GIW1sfkbfVkAs1WMwMB5BbQz/dxAdcIYJ/17VFtNHRyAE2Xotk9OToUGEpZUj0y0kkliXm ljmj4n4aShAsa7ToLRy7suZUjRrogitSY5zpwHIYd9utdSCpxdvuWlf2C2V9Mw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20221208 header.b=i4Do5OT+; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (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" ARC-Seal: i=1; s=key1; d=yhetil.org; t=1692205971; a=rsa-sha256; cv=none; b=S5UKgMFlKeMH7iYeKNQ5H6HmlPRPWUvi/NDEucf/M72qaSP9BGLqL7kAn7HCpYKkLwRUNv dgiKxywepKLWHailxs/KYY4mndAdC8U3jDLWSvwQZ1J7LM6AWLrCKRoCpJX9vlG+2qwAyh 0fJh2dbzvYQcJGa2SGPeMcBdo3H7qdUYdHse4sOXrW5Ma8ElNsWK1NWCPvxh/9OqUN+D4k 4E4IUFV2LmnT3BBd4p7AQikTDBDVPSkjfokVluGamfAU1U9cGBXgILN1rg9ndOhHtFAdEK GFguFCHvSQzjotAjlkoGnqs+u1pk5UCzZ/TJzUjnthhYDqN/8Z9C1XZSsMbhnQ== Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qWK4H-0001Mk-Rs; Wed, 16 Aug 2023 13:12:25 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qWK3y-00018Q-Np for guix-patches@gnu.org; Wed, 16 Aug 2023 13:12:11 -0400 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qWK3x-0006TR-Rm for guix-patches@gnu.org; Wed, 16 Aug 2023 13:12:06 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qWK3x-0005S1-N2 for guix-patches@gnu.org; Wed, 16 Aug 2023 13:12:05 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#64746] [PATCH 2/2] scripts: time-machine: Error when attempting to visit too old commits. Resent-From: Simon Tournier Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 16 Aug 2023 17:12:05 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 64746 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Ludovic =?UTF-8?Q?Court=C3=A8s?= , Maxim Cournoyer Cc: Josselin Poiret , Christopher Baines , Mathieu Othacehe , Tobias Geerinckx-Rice , Ricardo Wurmus , 64746@debbugs.gnu.org Received: via spool by 64746-submit@debbugs.gnu.org id=B64746.169220591520779 (code B ref 64746); Wed, 16 Aug 2023 17:12:05 +0000 Received: (at 64746) by debbugs.gnu.org; 16 Aug 2023 17:11:55 +0000 Received: from localhost ([127.0.0.1]:41942 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qWK3n-0005Oz-0e for submit@debbugs.gnu.org; Wed, 16 Aug 2023 13:11:55 -0400 Received: from mail-wr1-x42a.google.com ([2a00:1450:4864:20::42a]:38190) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qWK3d-0005Mq-Gf for 64746@debbugs.gnu.org; Wed, 16 Aug 2023 13:11:46 -0400 Received: by mail-wr1-x42a.google.com with SMTP id ffacd0b85a97d-3159b524c56so1056870f8f.1 for <64746@debbugs.gnu.org>; Wed, 16 Aug 2023 10:11:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1692205900; x=1692810700; h=content-transfer-encoding:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from:from:to:cc:subject:date:message-id :reply-to; bh=y0JMZjBfGsQUzVWYf0kAQB1D1nZ/pGEvdlNpkE3l5Rk=; b=i4Do5OT+BADurhpnVDeG/jX8B6PLTfeEhxOTAMJngyjRWFLncKDfYWKTknPUAFP4Aj gwX5+CT0BagbidkaeOdtRZ4Hd8Z+/Wt/9tI89ij9f6DIGP8sQNsLYbqAlLXTlTL6RAZA OQQ/dxDVyDbMbkxC48zoelTywGVBAfidFiJ2FenzCWbQQlXqs3bvYwciGvcwKA9cf8F2 IAhPcGsfs+DLHv86ADhc6bizTODAME5jzgj+765tvzkB/alM3b/JokWzPIlmAuPuyolQ b6/MdcZk44NFHyfc0HUcm8gQuaa8UCUxtwcvh//cDtPg+5eoa9zPITI6iZiXMFgcReJS E/pQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1692205900; x=1692810700; h=content-transfer-encoding:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=y0JMZjBfGsQUzVWYf0kAQB1D1nZ/pGEvdlNpkE3l5Rk=; b=YS02J6qpxJVZOKF+HxkdQW6BL9oqs95O6sOj52JCt7U05eueTgR8gxnFieCyTvrFWi lc5zENlV1dRV2xfnc/kcPebW8uNOYeFOCYdUZ1K6Ot2/36vDBpeATfMXTbqJw0oPjua3 7SWq3Exvkd2mFEj0XrYQ3T9A5ZZGW13YXsoXv3wmRa3GbDC0ytrgcYfrePF/KjJ6994D 8CTQ8cETiJqZVc4WNVZ3HhG/YcSlf20NHcUkRO7byzEtVcrCmzNtyd2xNcROJADKafiT DylFKfXDucJu5ebAkkBpMbI6LrWueSE4lZSniCJgFQMkVEJpVa9qYQ+fzj8ID9LWhw3F XYmw== X-Gm-Message-State: AOJu0Yy1TsROstjAlbxaQOawLwihF74aAF8Hshvh7F8YQsAdcdW1ABYk CpFmu9dOYm8FwsaRalrjK+vdbeEemf4= X-Google-Smtp-Source: AGHT+IEI4CX0ocWOKHfntNgBctmVYHe/bk0EugwPFaBEhqE5wn9TQ0Vp/dvxFj47y0KykBd3XXDrvg== X-Received: by 2002:a5d:62c9:0:b0:317:ead9:3363 with SMTP id o9-20020a5d62c9000000b00317ead93363mr1880682wrv.5.1692205899618; Wed, 16 Aug 2023 10:11:39 -0700 (PDT) Received: from pfiuh07 ([193.48.40.241]) by smtp.gmail.com with ESMTPSA id f6-20020adffcc6000000b0031984b370f2sm6763688wrs.47.2023.08.16.10.11.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 16 Aug 2023 10:11:39 -0700 (PDT) From: Simon Tournier In-Reply-To: <87pm3o8epw.fsf_-_@gnu.org> References: <87pm3o8epw.fsf_-_@gnu.org> Date: Wed, 16 Aug 2023 16:46:49 +0200 Message-ID: <87sf8jf3ja.fsf@gmail.com> 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-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Spam-Score: -3.59 X-Spam-Score: -3.59 X-Migadu-Queue-Id: 9756A4841A X-Migadu-Scanner: mx2.migadu.com X-TUID: uvTcbZABUoMi Hi, Thanks Maxim for this improvement. On Tue, 15 Aug 2023 at 18:14, Ludovic Court=C3=A8s wrote: > Following your question earlier today on IRC, I realized that this would > unconditionally add a Git checkout update every time =E2=80=98time-machin= e=E2=80=99 is > started. Please note that if git.savannah.gnu.org is not reachable, then =E2=80=9Cgu= ix time-machine=E2=80=9D fails. Let start with the regular: --8<---------------cut here---------------start------------->8--- $ guix describe Generation 26 Jul 12 2023 09:13:39 (current) guix 4a027d2 repository URL: https://git.savannah.gnu.org/git/guix.git branch: master commit: 4a027d2b0ee68e39f21f6802a8cd1751d3065330 $ guix time-machine --commit=3D4a027d2 -- describe Updating channel 'guix' from Git repository at 'https://git.savannah.gnu.or= g/git/guix.git'... substitute: updating substitutes from 'https://ci.guix.gnu.org'... 100.0% substitute: updating substitutes from 'https://bordeaux.guix.gnu.org'... 10= 0.0% building /gnu/store/sg8ca36rlbh4il6jy8dk2gr33lxm4z8q-compute-guix-derivatio= n.drv... Computing Guix derivation for 'x86_64-linux'... | substitute: updating substitutes from 'https://ci.guix.gnu.org'... 100.0% substitute: updating substitutes from 'https://bordeaux.guix.gnu.org'... 10= 0.0% The following derivations will be built: [...] building profile with 1 package... guix 4a027d2 repository URL: https://git.savannah.gnu.org/git/guix.git commit: 4a027d2b0ee68e39f21f6802a8cd1751d3065330 --8<---------------cut here---------------end--------------->8--- So far, so good. Here all is cached and so on. Now, let make git.savannah.gnu.org unreachable by tweaking some stuff. Then, --8<---------------cut here---------------start------------->8--- $ guix time-machine --commit=3D4a027d2 -- describe guix time-machine: error: Git error: failed to resolve address for git.sava= nnah.gnu.org: Name or service not known --8<---------------cut here---------------end--------------->8--- Well, even if this patch will add another inefficiency, there is already one. :-) I would say without having looking closely to the code that the issue comes because something=E2=84=A2 tries to connect before checking if = the commit is already in the local checkout. > This would noticeably degrade performance in the cache-hit case (when > running a cached channel set). Currently, on cache hits, > =E2=80=98cached-channel-instance=E2=80=99 directly returns ~/.cache/guix/= profiles/xyz > without performing any Git or (guix store) operation. As shown above, I guess there is bug=E2=80=A6 > This is important because it guarantees that one can run =E2=80=98guix > time-machine -C channels.scm -- COMMAND=E2=80=99 at pretty much the same = speed > as =E2=80=98guix COMMAND=E2=80=99. Yes but I guess it could also be improved as shown above. :-) The check if the requested commit is newer than the %oldest-possible-commit should use the Git history graph closure similarly as the authentication mechanism, no? And this check should come after checking the cache, no? Cheers, simon