From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id EPRuI2+I5mHcKwAAgWs5BA (envelope-from ) for ; Tue, 18 Jan 2022 10:29:19 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id QFPYIG+I5mGhqwAA9RJhRA (envelope-from ) for ; Tue, 18 Jan 2022 10:29:19 +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 56EC739139 for ; Tue, 18 Jan 2022 10:29:19 +0100 (CET) Received: from localhost ([::1]:50532 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1n9knm-0002DS-IC for larch@yhetil.org; Tue, 18 Jan 2022 04:29:18 -0500 Received: from eggs.gnu.org ([209.51.188.92]:44040) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n9knD-0002Cy-N0 for guix-devel@gnu.org; Tue, 18 Jan 2022 04:28:43 -0500 Received: from [2a00:1450:4864:20::529] (port=46847 helo=mail-ed1-x529.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1n9knB-0006i6-Py for guix-devel@gnu.org; Tue, 18 Jan 2022 04:28:43 -0500 Received: by mail-ed1-x529.google.com with SMTP id m11so195788edi.13 for ; Tue, 18 Jan 2022 01:28:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=beadling-co-uk.20210112.gappssmtp.com; s=20210112; h=references:user-agent:from:to:cc:subject:in-reply-to:message-id :date:mime-version:content-transfer-encoding; bh=QrAcUlKz4J5fu7jxMHxy7xXELSfdu2RCLZNaxt9/zdw=; b=cwFwCf88kn//lBGdjhnQ39TV1YxSTB56+mts3HJNUhAgwISp35jzXc5E5W65dpJl9R 9n/QZYFmipRHGu0HeuXeyRIMs8ADJlwguNgtDy7NbgakHWeBhd+OSAcDEvgkhQSRd8lt r9eJmZe3DZ/+V0lqzGA7oOSGVe/O1SJOMR9NCUgVgkqffrpA27N+XZSp41unBa+jPLhq QAsme/lmn4DRmvdX9Yg8Ff1TBLL8AkZM4bXf5ECrRDLVtLWDFJ665NUFVPaMkBWrVOgJ V3I7q85kkWG+NJXTc9alzRS+/3urDMdtU2aHeMkuzZyMAvGTzc4hsHN8QTwjxTwF6Bbf t+3Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:references:user-agent:from:to:cc:subject :in-reply-to:message-id:date:mime-version:content-transfer-encoding; bh=QrAcUlKz4J5fu7jxMHxy7xXELSfdu2RCLZNaxt9/zdw=; b=ntKBeBdbOVPw2UO0FNqVAgAtxz6oApNe29C3imLk402lrTLwV8NuIBb+L1krdi7zaq +GNathqzGzCAmR0vSuT++jUro7F2nfx2yRbtbJXkPG4WOApX0ak6U3MenBHiKdoNu9eq AOaK+wJQ5S44BFwtJLmcRMO2rwrvNg4IK1oHgbzFQtHsJ2gbc0vwbGks7O7IKSRzyavC vkEs3NfVKGnsfXloiay4uglTH1qED6P1XK6cUk9Z+1kpwy8E4rKi2X/Kg3JTUjXVavgh pfZGJyYAf11fKgRfJ+A6rC4HUxhC28YxJNoQtIfTi9HGyY+pRq0S6Z8PiyDcHET/Kz6E 18Hg== X-Gm-Message-State: AOAM532iOA9xRcvd16HZ1gM/M5IjicDCKPedw3WPMODS8tvmWI+inCru CTvVcLJiYcYsDrph/npmWMEWq8/NMrrLXpqL X-Google-Smtp-Source: ABdhPJxZYhFcKmzKBXxVdZTJnXK6sNFzkizRIN5UCRQPOV2Zy3AX4RtmUgK7PgqX665+QqVV3lCWvw== X-Received: by 2002:a05:6402:486:: with SMTP id k6mr25136458edv.330.1642498119466; Tue, 18 Jan 2022 01:28:39 -0800 (PST) Received: from xps13 (host-92-17-247-131.as13285.net. [92.17.247.131]) by smtp.gmail.com with ESMTPSA id e24sm6827787edv.62.2022.01.18.01.28.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 18 Jan 2022 01:28:38 -0800 (PST) References: <877db6ge0o.fsf@beadling.co.uk> <874k697thf.fsf@elephly.net> <87r19d5pcw.fsf@elephly.net> <871r1dguq6.fsf@beadling.co.uk> <7a2e92a6871fa2e40b749d8e4bfc6aa811df0a22.camel@telenet.be> User-agent: mu4e 1.4.15; emacs 27.2 From: Phil To: Maxime Devos Subject: Re: Parallel guix builds can trample? In-reply-to: <7a2e92a6871fa2e40b749d8e4bfc6aa811df0a22.camel@telenet.be> Message-ID: <87mtjtfl4q.fsf@beadling.co.uk> Date: Tue, 18 Jan 2022 09:28:37 +0000 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Host-Lookup-Failed: Reverse DNS lookup failed for 2a00:1450:4864:20::529 (failed) Received-SPF: none client-ip=2a00:1450:4864:20::529; envelope-from=phil@beadling.co.uk; helo=mail-ed1-x529.google.com X-Spam_score_int: -10 X-Spam_score: -1.1 X-Spam_bar: - X-Spam_report: (-1.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, PDS_HP_HELO_NORDNS=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RDNS_NONE=0.793, SPF_HELO_NONE=0.001, SPF_NONE=0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: guix-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: "guix-devel@gnu.org" Errors-To: guix-devel-bounces+larch=yhetil.org@gnu.org Sender: "Guix-devel" 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=1642498159; 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: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=QrAcUlKz4J5fu7jxMHxy7xXELSfdu2RCLZNaxt9/zdw=; b=sxL39VmzSgAvYmhzUIirGasaW6YDVXhMyR83zUmbnwC0ERWngC7UpO2C7CLYH7t23s6jKd tA5956gDAOQkIAGf8sNAQIItT/j1zJ9DJVTaZHCZO2GXg+W895ys4PeBbDjc3wi4HYItCq fAUgiz9SPKrc1Kz2bXwtB21ArFr7idzGmxSuaiZUXYWZNVTgGMYb5Tslj1uFy1a28WT+Zq +YPBM9Haw1b8uyXwmb+DQsJ8xE68j9lTWtwSe9SwxQSYytQeivl6iJ5XK2wuTg80Ptut9V fY6WOWfaa4tymL1rQTLIK8r8FzTKmrB6rIbR4QAmAZRg6xbzWjtnb04j4n7xCA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1642498159; a=rsa-sha256; cv=none; b=p8zGAproqQRMVhvt/xHGdae935aVs7TbyC/dVpq8bwJYVY216nUq8vAVod2oDn1K3f73mx RQY/gQ42dzkXni0Wr/WOe9r6ADIYYkfKwwj8uc7Y9K2SaoA78Z4ziZxBHJgFIrLgi/uHZK ghlMX9clFJHmqdHrNroy/jh516T9jXos4UfJh773ifqdT8hdGJs1Y5uVoV5O2Naw0Q1JKa NTdsQEaxdgE6bbEdChuNVMH3IUx1mK8TBsW1975HLHMGYmU51nBowDQdHjE4rnkByORBMX mVAu9JfAyp+VHsTB9tMaKHUmcCcFHTg6e7uxgMaL1k+ncLUHNylBbslcaTvfkw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=beadling-co-uk.20210112.gappssmtp.com header.s=20210112 header.b=cwFwCf88; dmarc=none; spf=pass (aspmx1.migadu.com: domain of "guix-devel-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-devel-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: -1.12 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=beadling-co-uk.20210112.gappssmtp.com header.s=20210112 header.b=cwFwCf88; dmarc=none; spf=pass (aspmx1.migadu.com: domain of "guix-devel-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-devel-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: 56EC739139 X-Spam-Score: -1.12 X-Migadu-Scanner: scn1.migadu.com X-TUID: B9b2ABUrMkAu Maxime Devos writes: > Maybe 'latest-repository-commit' and 'update-cached-checkout' commit > can be modified to not use 'switch-to-ref', and instead directly ask > libgit =E2=80=98what's the tree structure of commit cabba9e=E2=80=99 and = call a > procedure like 'add-file-tree-to-store'. That would avoid lock files, > creating separate directories for concurrent checkouts, ... Thanks Maxime - I'll take a look at this as an option. One option I was thinking of is to make this SHA call dependent on the branch as well as the URL: https://github.com/guix-mirror/guix/blob/9f526f5dad5f4af69d158c50369e182305= 147f3b/guix/git.scm#L131-L133 Technically this still leaves a race condition if someone were to do parallel builds on the same branch however, so to completely solve the problem I think we'd have make the SHA call on repo+commit-id. This obviously limit the utility of the cache. To mitigate performance concerns, I think it's possible to set the branches and depth in git such that we only clone the bare-bones only?.