From: Phil <phil@beadling.co.uk>
To: Maxime Devos <maximedevos@telenet.be>
Cc: "guix-devel@gnu.org" <guix-devel@gnu.org>
Subject: Re: Parallel guix builds can trample?
Date: Tue, 18 Jan 2022 09:28:37 +0000 [thread overview]
Message-ID: <87mtjtfl4q.fsf@beadling.co.uk> (raw)
In-Reply-To: <7a2e92a6871fa2e40b749d8e4bfc6aa811df0a22.camel@telenet.be>
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 ‘what's the tree structure of commit cabba9e’ 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/9f526f5dad5f4af69d158c50369e182305147f3b/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?.
next prev parent reply other threads:[~2022-01-18 9:29 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-11 21:26 Parallel guix builds can trample? Phil
2022-01-11 23:16 ` Ricardo Wurmus
2022-01-12 7:00 ` Philip Beadling
2022-01-12 8:27 ` Ricardo Wurmus
2022-01-12 9:37 ` Phil
2022-01-17 17:23 ` Phil Beadling
2022-01-17 17:44 ` Maxime Devos
2022-01-18 9:28 ` Phil [this message]
2022-01-18 9:36 ` Maxime Devos
2022-01-18 14:59 ` Ludovic Courtès
2022-01-18 10:10 ` Phil
2022-01-18 12:53 ` Phil Beadling
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87mtjtfl4q.fsf@beadling.co.uk \
--to=phil@beadling.co.uk \
--cc=guix-devel@gnu.org \
--cc=maximedevos@telenet.be \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).