From: Alex Sassmannshausen <alex@pompo.co>
To: "Ludovic Courtès" <ludo@gnu.org>
Cc: 26608@debbugs.gnu.org, 22629@debbugs.gnu.org, 32022@debbugs.gnu.org
Subject: bug#26608: bug#22629: “Stable” branch
Date: Tue, 04 Sep 2018 10:02:31 +0200 [thread overview]
Message-ID: <87pnxtu1uw.fsf@pompo.co> (raw)
In-Reply-To: <87zhwywe8v.fsf@gnu.org>
Ludovic Courtès writes:
> Hi Alex,
>
> Alex Sassmannshausen <alex@pompo.co> skribis:
>
>> Ludovic Courtès writes:
>
> [...]
>
>>> I just had a bright idea (yes!): this can be addressed by writing
>>> something like this in ~/.config/guix/channels.scm:
>>>
>>> (map latest-commit-with-substitutes-available
>>> %default-channels)
>>>
>>> The hypothetical ‘latest-commit-with-substitutes-available’ would use
>>> (git) and (guix ci) to find the latest commit for which substitutes of
>>> interest are available, and would return:
>>>
>>> (channel
>>> ;; …
>>> (commit "cabbag3")) ;the ideal commit
>>
>> This sounds incredibly interesting — and it is testament once again to
>> the power of Guix that this kind of solution could be feasible!
>
> Just to be clear: I don’t think this would be a substitute for a
> “stable” branch; rather, I view as a way to have user-defined policies
> such as “pull up to the latest commit for which there’s a substitute for
> IceCat.”
Ah, I understand now.
So the example you provided is a user-defined policy to install the
latest version of Guix that is downloadable using substitutes (if guix
publish has published those already).
As you say, in a similar vein, the end user could for themselves define
a policy that searches for a commit containing a specific successful
build, or a set of specific successful builds.
>> Thinking this through in my head somewhat, I had the following thoughts:
>> - This procedure is invoked client side, where the channel is defined
>> - That means the git searching is done client side, on every invocation
>> of guix (I guess this might be cacheable?)
>
> On every invocation of ‘guix pull’ only.
That makes sense, and is way better than I feared :-)
>> I have no idea what the performance cost would be. I guess you would
>> use "guix weather" to turn the set of requested packages into a manifest
>> which can then be checked with it.
>
> As I imagine it, the cost would be a few HTTP queries to the Cuirass
> API. I should try to come up with an example to better explain what I
> had in mind!
Your example helps visualize this, thanks.
Your example depends on there being a jobset that comprises the set of
packages you are interested in testing.
I imagine it is possible to do the same for an individual package / job.
The situation would be different if the end user wanted to perform a
similar operation for an arbitrary set of packages on their end.
It would probably involve something like this (probably naive):
(define (latest-commit-successfully-built-pkg pkg)
"Return the latest commit for the pkg for which substitutes are
(potentially) available."
;; Like your version, but magically performs query
;; for pkg, not the guix-modular-master evaluation
(let* ((evaluations (latest-evaluations pkg))
(candidates (filter-map (lambda (json)
(match (hash-ref json "checkouts")
((checkout)
(cons (hash-ref json "id")
(hash-ref checkout "commit")))
(_ #f)))
evaluations)))
(map (match-lambda
((evaluation . commit)
(and (evaluation-complete? evaluation)
commit)))
candidates)))
(any (match-lambda
((evaluation . commit) commit)
(apply lset-intersection equal?
;; Like latest-commit-successfully-built, but takes an
;; individual package name for which we return the
;; commit
(map latest-commit-successfully-built-pkg
%set-of-packages))))
Obviously the larger the set, the more requests are required, and the
lower the chance of a commit being available / a downgrade occuring
>> The question of security updates is tricky at the moment already — I
>> would hazard a guess that many people bail out of upgrading when they
>> can't get substitutes for their entire profile / system right now, which
>> means they are not getting security upgrades for package (a) when a
>> substitute for (b) fails.
>
> That’s probably true, and I agree it’s problematic.
>
> What I typically do is “guix pull && guix package -n -u”. Then I look
> at things that would be built; if, say, LibreOffice is among them, I
> wait for a little while and try again later, until I can get enough
> substitutes. That usually works okay, but it fails if it turns out that
> one of the dependencies fails to build: substitutes never become
> available in that case.
Interesting. Do you think this kind of thing might be useful to have in
the Guix manual? Like, in a section about a "typical" desktop end-user
might manage their system day to day?
Alex
next prev parent reply other threads:[~2018-09-04 8:03 UTC|newest]
Thread overview: 73+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-11 10:35 bug#22629: Towards a new 'guix pull' Ludovic Courtès
2017-02-22 7:57 ` Pjotr Prins
2017-02-24 18:21 ` Leo Famulari
2018-04-08 16:48 ` Ludovic Courtès
2018-04-08 17:45 ` Nils Gillmann
2018-05-31 14:43 ` bug#22629: [PATCH 0/4] 'guix pull' produces a self-contained Guix Ludovic Courtès
2018-05-31 14:43 ` bug#22629: [PATCH 1/4] self: Produce a complete package with the 'guix' command Ludovic Courtès
2018-05-31 14:43 ` bug#22629: [PATCH 2/4] pull: Install the new Guix in a profile Ludovic Courtès
2018-05-31 14:43 ` bug#22629: [PATCH 3/4] self: Compute and use locale data Ludovic Courtès
2018-05-31 14:43 ` bug#22629: [PATCH 4/4] self: Build the Info manual Ludovic Courtès
2018-05-31 14:53 ` bug#22629: [PATCH 0/4] 'guix pull' produces a self-contained Guix Thompson, David
2018-06-01 12:13 ` Ludovic Courtès
2018-06-03 13:08 ` Pjotr Prins
2018-06-03 20:29 ` Ludovic Courtès
2018-06-04 19:12 ` Pjotr Prins
2018-05-31 18:00 ` Konrad Hinsen
2018-06-04 11:20 ` Ludovic Courtès
2018-06-05 11:45 ` Konrad Hinsen
2018-06-06 13:24 ` Ludovic Courtès
2018-06-06 15:54 ` Konrad Hinsen
2018-06-06 20:49 ` Ludovic Courtès
2018-05-31 18:58 ` Ricardo Wurmus
2018-06-01 12:11 ` Ludovic Courtès
2018-06-05 16:47 ` Fis Trivial
2018-06-06 13:27 ` Ludovic Courtès
2018-06-06 20:58 ` Fis Trivial
2018-06-09 10:07 ` Ludovic Courtès
2017-09-15 20:39 ` bug#28471: guix pull doesn't update the user manual Maxim Cournoyer
[not found] ` <handler.28471.D22629.152853885816765.notifdone@debbugs.gnu.org>
2018-06-13 21:46 ` bug#22629: bug#28471: closed (Re: bug#22629: [PATCH 0/4] 'guix pull' produces a self-contained Guix) Ludovic Courtès
2018-07-19 4:45 ` bug#22629: [PATCH 0/4] 'guix pull' produces a self-contained Guix Chris Marusich
2018-07-19 12:15 ` Ludovic Courtès
2018-08-28 15:16 ` bug#22629: Channels! Ludovic Courtès
2018-08-28 15:17 ` bug#22629: [PATCH 1/3] discovery: Add 'scheme-modules*' Ludovic Courtès
2018-08-28 15:17 ` bug#22629: [PATCH 2/3] Add (guix describe) and use it to initialize '%package-search-path' Ludovic Courtès
2018-08-28 15:17 ` bug#22629: [PATCH 3/3] DRAFT Add (guix channels) and use it in (guix scripts pull) Ludovic Courtès
2018-08-28 17:24 ` bug#22629: Channels! Pjotr Prins
2018-08-28 19:52 ` Mark H Weaver
2018-08-28 21:52 ` Ludovic Courtès
2018-08-29 4:09 ` Konrad Hinsen
2018-08-29 14:25 ` Ludovic Courtès
2018-08-29 15:30 ` Konrad Hinsen
2018-08-29 20:50 ` Ludovic Courtès
2018-08-29 9:29 ` Alex Sassmannshausen
2018-08-29 17:14 ` bug#22629: Channels not needed for a stable branch (was: Channels!) Mark H Weaver
2018-08-29 18:26 ` Ricardo Wurmus
2018-08-30 5:57 ` Konrad Hinsen
2018-08-30 6:42 ` bug#22629: Channels not needed for a stable branch Mark H Weaver
2018-08-30 10:10 ` Konrad Hinsen
2018-08-30 12:18 ` bug#22629: “Stable” branch Ludovic Courtès
2018-08-30 14:10 ` Alex Sassmannshausen
2018-08-30 22:02 ` Ludovic Courtès
2018-08-31 9:39 ` Konrad Hinsen
2018-08-31 9:58 ` bug#26608: " Ludovic Courtès
2018-08-31 10:33 ` bug#32022: " Konrad Hinsen
2018-08-31 13:01 ` Ludovic Courtès
2018-08-31 11:24 ` bug#26608: " Jan Nieuwenhuizen
2018-08-31 11:45 ` bug#32022: " Ricardo Wurmus
2018-09-03 14:10 ` Alex Sassmannshausen
2018-09-03 19:52 ` Ludovic Courtès
2018-09-04 8:02 ` Alex Sassmannshausen [this message]
2018-09-04 12:22 ` bug#26608: " Ludovic Courtès
2018-09-03 20:27 ` Ludovic Courtès
2021-08-20 11:09 ` bug#26608: " zimoun
2018-08-30 14:46 ` Konrad Hinsen
2018-08-29 21:02 ` bug#22629: Channels not needed for a stable branch Ludovic Courtès
2018-08-30 21:29 ` bug#22629: Channels! Ludovic Courtès
2018-08-30 21:31 ` bug#22629: [PATCH v2 1/3] discovery: Add 'scheme-modules*' Ludovic Courtès
2018-08-30 21:31 ` bug#22629: [PATCH v2 2/3] Add (guix describe) and use it to initialize '%package-search-path' Ludovic Courtès
2018-08-31 12:21 ` Ricardo Wurmus
2018-08-31 13:56 ` Ludovic Courtès
2018-08-31 14:32 ` Ricardo Wurmus
2018-08-30 21:31 ` bug#22629: [PATCH v2 3/3] Add (guix channels) and use it in (guix scripts pull) Ludovic Courtès
2018-09-02 15:11 ` bug#22629: Channels! Ludovic Courtès
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=87pnxtu1uw.fsf@pompo.co \
--to=alex@pompo.co \
--cc=22629@debbugs.gnu.org \
--cc=26608@debbugs.gnu.org \
--cc=32022@debbugs.gnu.org \
--cc=ludo@gnu.org \
/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).