From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:403:478a::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id +OEBGuJV+GTPVAAAauVa8A:P1 (envelope-from ) for ; Wed, 06 Sep 2023 12:35:14 +0200 Received: from aspmx1.migadu.com ([2001:41d0:403:478a::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id +OEBGuJV+GTPVAAAauVa8A (envelope-from ) for ; Wed, 06 Sep 2023 12:35:14 +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 0BEB3EDA2 for ; Wed, 6 Sep 2023 12:35:13 +0200 (CEST) Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20221208 header.b="WOFK/TdB"; 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"; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none) ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1693996514; 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=YTn7VorFj0F6jnPSpbz2n+KNCQuxJIvwxONMrzwA0sg=; b=BuqJWNaov80h3k1IHpseF6daow0MOLhVQzaxD0J+c1i79OrlXSoY2A6RP5vaST8zf4lvkx HT5ZmaukUF01jSC6SHoV5q0oHU7VTwBPH7otNNiUnAD4qd3gfGTZ4m1Eox5+cSBUhK8CD/ aqF8TN7v+/YPBX47KSQaBLpNHVcsRR4IWskRnIiTryDajXe3D3Y3nmAQ0PxQsTEBW8bOQP 8/V6HPRRDy7pdND4VL+s73KEWfDpQdMEQly8SvoggtXWznDEGLDE/MahFbRPbRzMDCtvnL hLAcwVzrNwZ0TSw8TYml0KGaqNXwpNCAPFcoOt8XCXb0r4D84v/qbuOF2h5eQQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1693996514; a=rsa-sha256; cv=none; b=ui02nL8Dg2Q1jkIsSt86M46hK+lAFv/Uohc5o8qn2PDbnrkpHwo9izZrlW7LqXi7DlxCyP G8A0/T3Y7Fb/qeb7BzGtPiA9PeaW8qDQgsiYIyFIoggMPjFCXdvsJ94qKZDbDLCCy603BG AVrDe78E+R9lYiHAYIigz9g7VoIPb65Vk7Vb8d+M1s/bbYNtOG3zo7bgjFb1ooM7dufzTO VRQ/cSvGHI4af8/0Raph3uANeSh9NSV/n2zOvPToiGXsKnbL03kT0pjYtumTdb8FWKcoqB O7GH3WbUnm1xdBzwMP4XOO9MxEErWF1/2yDtvlJcGrFRIQQmcvkw6wTsuT6rWA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20221208 header.b="WOFK/TdB"; 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"; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qdpsF-0004XR-0h; Wed, 06 Sep 2023 06:35:03 -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 1qdpsD-0004Wt-Af for guix-patches@gnu.org; Wed, 06 Sep 2023 06:35:01 -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 1qdpsD-0004Nd-2b for guix-patches@gnu.org; Wed, 06 Sep 2023 06:35:01 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qdpsE-0002oD-1W for guix-patches@gnu.org; Wed, 06 Sep 2023 06:35:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#65352] time-machine, unavailable network or Savannah down References: <87fs4h4vb9.fsf@gmail.com> In-Reply-To: <87fs4h4vb9.fsf@gmail.com> Resent-From: Simon Tournier Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 06 Sep 2023 10:35:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 65352 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: To: 65352@debbugs.gnu.org, Maxim Cournoyer Cc: Ludovic =?UTF-8?Q?Court=C3=A8s?= Received: via spool by 65352-submit@debbugs.gnu.org id=B65352.169399648410770 (code B ref 65352); Wed, 06 Sep 2023 10:35:02 +0000 Received: (at 65352) by debbugs.gnu.org; 6 Sep 2023 10:34:44 +0000 Received: from localhost ([127.0.0.1]:33039 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qdprw-0002nd-6Y for submit@debbugs.gnu.org; Wed, 06 Sep 2023 06:34:44 -0400 Received: from mail-wr1-x42e.google.com ([2a00:1450:4864:20::42e]:41131) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qdprs-0002nM-Mt for 65352@debbugs.gnu.org; Wed, 06 Sep 2023 06:34:43 -0400 Received: by mail-wr1-x42e.google.com with SMTP id ffacd0b85a97d-31f4629aaaaso372304f8f.0 for <65352@debbugs.gnu.org>; Wed, 06 Sep 2023 03:34:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1693996474; x=1694601274; darn=debbugs.gnu.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=YTn7VorFj0F6jnPSpbz2n+KNCQuxJIvwxONMrzwA0sg=; b=WOFK/TdBzdTa152rbCUFKZTo6lcaSN8p5XBqU5eFn3Smqyv8LTRl9IP5LiIiNn83WP aHzrgFpAcyUlYObtgxbKsq78LKT10xAXqMC/FmWu3P+OoQy+YiJIgffUWpjgJ3H7lS34 TGCHcvYfQWMILUE6hMDj0pYR89zDSyraAdqguGCYezJE//2p2YDGx0a/CuBrUVIKg2GK PJPq0bqCHr5QZyQg+f6ZFMyQg6qrQpotLNAZbT+Eb8LRz/dk2UABBvvkjL9ycFFLrn82 hYOt9nYfi6OxyKQ/N52paDyAC9nAqcX1DvfBVfBR8zIYLj3exD4bD+5WjCEezlTXbAoI nwsQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1693996474; x=1694601274; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=YTn7VorFj0F6jnPSpbz2n+KNCQuxJIvwxONMrzwA0sg=; b=k1uim8CMWAoTka0NHSgZLv0wyJgGqj0tPfAG6gpAd1kWiU+vabA3OqMcncmEJEAglA uErTcNvpah6gX+Tj26RWy4l7EqvFO09MfG0+VNQb1raoXHdLMs7ZqX1KothRqK0P33Hp tetJ6B5W97ju9BgBeqrKV2M9emFjNygqkZlrPf3BB+ysHScZ/e3wLtMequUwPg5GKSHc kShMsthBxhsuq0+xGsM8ZU/0mIO4jAhMXG4+iX8K2d1SFjJ3l6SbJkDhtWePLImeFQwX rV+qx/iDjcpO1is0sR5mM+qljcdv5RS8n9z9pK3Eaha3+r999qYS5dsL2WJX4wlEnEYz ewYQ== X-Gm-Message-State: AOJu0YyCZ/jwQbeHnu9/m/rHAwrES/X+hXO9IRi0NDDj4Rdh4U6zii7T f2JrPas9bcREqQmjgJAEhI5AVMTSqaw= X-Google-Smtp-Source: AGHT+IGmaxzv4dbKpkD1/jZVAujvGy+QPe+74YRPHbEND7xmdqDpfS4PPhIC9uCjXQxjqsMCeu+GtQ== X-Received: by 2002:a5d:5227:0:b0:31a:d22c:1ee with SMTP id i7-20020a5d5227000000b0031ad22c01eemr12086355wra.1.1693996473864; Wed, 06 Sep 2023 03:34:33 -0700 (PDT) Received: from lili ([2a01:e0a:59b:9120:65d2:2476:f637:db1e]) by smtp.gmail.com with ESMTPSA id z14-20020adff1ce000000b0031c855d52efsm19930851wro.87.2023.09.06.03.34.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 Sep 2023 03:34:33 -0700 (PDT) From: Simon Tournier Date: Wed, 06 Sep 2023 12:32:41 +0200 Message-ID: <86ledjoaly.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-Country: US X-Migadu-Flow: FLOW_IN X-Migadu-Scanner: mx0.migadu.com X-Migadu-Spam-Score: -5.13 X-Spam-Score: -5.13 X-Migadu-Queue-Id: 0BEB3EDA2 X-TUID: ecPUbQF1Y8KP Hi Maxim, Let start another branch in that thread of #65352. :-) Let start the discussion on good basis, let start with an example: --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--- Do we agree it is bug? Do we agree that the behaviour is not POLA? It is the same when specifying a release tag, --8<---------------cut here---------------start------------->8--- $ guix time-machine --commit=3Dv1.4.0 -- 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--- I think Guix needs to be reliable whatever the status of Savannah when a local Git ref is in the local cached checkout. After this introduction, let start the core discussion. On Tue, 05 Sep 2023 at 22:00, Maxim Cournoyer w= rote: > I don't know if we want to consider tags are immutable or not; the > safest is to consider them an *not* immutable, which is what we had been > doing. I agree it doesn't cover all the potential git refspecs; we can > get there if we want (although I suppose it's uncommon for someone to > try 'guix time-machine --commit=3Dv1.3.0-47405-ge0767a24d0' or similar). [...] > I'm not sure if short commit IDs should be treated as immutable, since > in theory they can collide; the safest would be to check if there are > collisions and report an error if there is; and this requires fetching > new objects first. Well, the behaviour that I want is that it just works whatever the status of Savannah when I have a local Git ref that matches what I provide to =E2=80=99guix time-machine=E2=80=99 (or guix pull or else). I think you are inferring a rule from two corner-cases. And from my point of view, there are only hypothetical. :-) 1. About tag. The ones from upstream are defacto immutable. It is uncommon that people set local tag under ~/.cache/guix/checkouts. And, the failure when Savannah is unreachable appears to me more annoying than hypothetical mutable tags. Therefore, I propose what I already proposed. :-) It will make it works for most of the cases. Even, what would happen if a tag is changed? The user does not get the same inferior for two invocations. The question is: what triggers the update of the cached checkout? What is the consequence for not updating when the user-specified Git ref is a mutable one (tag or else)? Here, I am proposing to delay the update until the next =E2=80=9Cguix pull=E2=80=9D or =E2=80=9Cguix time-mac= hine -q=E2=80=9D, well until the user invokes a command with a Git ref that does not belong to the local cached checkout. I do not see why this delay is a problem. And it avoids an update. 2. About short commit IDs. The same reasoning applies. :-) About the collision, it is the same. It only delays the collision report. All in all, I think that reference-available? needs to check if the Git ref belongs to the local cached checkout and that=E2=80=99s all. If it is,= use it, else update the local cached checkout. At time t, the user-specificity Git ref can match some local Git ref but not the upstream state. And so? Somehow, I am considering the local cached checkout as the primary reference for looking up Git ref. Do you see a potential issue that I am missing? Cheers, simon