‘channel-with-substitutes-available’ makes assumptions about job names

  • Open
  • quality assurance status badge
Details
3 participants
  • Ludovic Courtès
  • Mathieu Othacehe
  • zimoun
Owner
unassigned
Submitted by
Ludovic Courtès
Severity
normal
L
L
Ludovic Courtès wrote on 21 May 2021 14:58
(address . bug-guix@gnu.org)
87mtso2qgc.fsf@inria.fr
Hello!

I wanted to try something like this:

Toggle snippet (12 lines)
(use-modules (guix ci))

(list (channel-with-substitutes-available
%default-guix-channel
"https://ci.guix.gnu.org")
(channel-with-substitutes-available
(channel
(name 'guix-hpc)
(url "https://gitlab.inria.fr/guix-hpc/guix-hpc.git"))
"https://guix.bordeaux.inria.fr"))

However, that doesn’t work because ‘channel-with-substitutes-available’
looks for a ‘guix.x86_64-linux’ job, which doesn’t exist on this Cuirass
instance.

Wouldn’t it be enough to look for the latest completed evaluation (of a
given jobset)?

Incidentally, it seems ‘complete?’ is always false:

Toggle snippet (4 lines)
scheme@(guix ci)> (latest-evaluations "https://guix.bordeaux.inria.fr" 10)
$16 = (#<<evaluation> id: 88628 spec: "guix-past" complete?: #f checkouts: (#<<checkout> commit: "065d2cd6ced96ddb38c15a46f798488f61660a33" channel: "guix">)> #<<evaluation> id: 88627 spec: "guix-hpc" complete?: #f checkouts: (#<<checkout> commit: "065d2cd6ced96ddb38c15a46f798488f61660a33" channel: "guix">)> #<<evaluation> id: 88584 spec: "guix-past" complete?: #f checkouts: (#<<checkout> commit: "fd5527407ff336c4af1c5511e19c0956720cd7aa" channel: "guix">)> #<<evaluation> id: 88583 spec: "guix-hpc" complete?: #f checkouts: (#<<checkout> commit: "fd5527407ff336c4af1c5511e19c0956720cd7aa" channel: "guix">)> #<<evaluation> id: 88470 spec: "guix-past" complete?: #f checkouts: (#<<checkout> commit: "2710df38b0c317bdc69c61c7775d8141eb214dd1" channel: "guix">)> #<<evaluation> id: 88469 spec: "guix-hpc" complete?: #f checkouts: (#<<checkout> commit: "2710df38b0c317bdc69c61c7775d8141eb214dd1" channel: "guix">)> #<<evaluation> id: 88442 spec: "guix-past" complete?: #f checkouts: (#<<checkout> commit: "83d21785a9fbc6a7e87435d437b2b3917f3a3b09" channel: "guix">)> #<<evaluation> id: 88441 spec: "guix-hpc" complete?: #f checkouts: (#<<checkout> commit: "83d21785a9fbc6a7e87435d437b2b3917f3a3b09" channel: "guix">)> #<<evaluation> id: 88186 spec: "guix-past" complete?: #f checkouts: (#<<checkout> commit: "061823da03add693df9c411fee9ccdcc7291f0ec" channel: "guix">)> #<<evaluation> id: 88185 spec: "guix-hpc" complete?: #f checkouts: (#<<checkout> commit: "061823da03add693df9c411fee9ccdcc7291f0ec" channel: "guix">)>)

Thoughts?

Ludo’.
M
M
Mathieu Othacehe wrote on 21 May 2021 15:28
Re: bug#48564: ‘channel-with-substitutes-availa ble’ makes assumptions about job names
(name . Ludovic Courtès)(address . ludovic.courtes@inria.fr)(address . 48564@debbugs.gnu.org)
87fsygqkqc.fsf@gnu.org
Hey Ludo,

Toggle quote (3 lines)
> Wouldn’t it be enough to look for the latest completed evaluation (of a
> given jobset)?

I guess it would be enough but we would need to specify the jobset that
needs to be used, this way maybe:

Toggle snippet (5 lines)
(define* (channel-with-substitutes-available chan url
#:key
(specification "master"))

this would also allow me to simplify this patchset:

WDYT?

Thanks,

Mathieu
L
L
Ludovic Courtès wrote on 21 May 2021 16:30
(name . Mathieu Othacehe)(address . othacehe@gnu.org)(address . 48564@debbugs.gnu.org)
87zgwo17nl.fsf@inria.fr
Hi,

Mathieu Othacehe <othacehe@gnu.org> skribis:

Toggle quote (10 lines)
>> Wouldn’t it be enough to look for the latest completed evaluation (of a
>> given jobset)?
>
> I guess it would be enough but we would need to specify the jobset that
> needs to be used, this way maybe:
>
> (define* (channel-with-substitutes-available chan url
> #:key
> (specification "master"))

Sure, SGTM.

Toggle quote (3 lines)
> this would also allow me to simplify this patchset:
> https://issues.guix.gnu.org/47929.

Oh nice, I had completely overlooked that one! I’ll take a look.

Thank you,
Ludo’.
M
M
Mathieu Othacehe wrote on 26 May 2021 16:17
(name . Ludovic Courtès)(address . ludovic.courtes@inria.fr)(address . 48564@debbugs.gnu.org)
87bl8x60lq.fsf@gnu.org
Hey Ludo,

Toggle quote (5 lines)
>> (define* (channel-with-substitutes-available chan url
>> #:key
>> (specification "master"))
>

I have fixed the evaluation complete? field issue with
a2155f41f53eeb5000857e7160c5ad0916dc9bfa.

Regarding the idea we had, things are I fear a little more complex. If
we consider what you would like to achieve:

Toggle snippet (12 lines)
(list (channel-with-substitutes-available
%default-guix-channel
"https://ci.guix.gnu.org"
#:spec "master")
(channel-with-substitutes-available
(channel
(name 'guix-hpc)
(url "https://gitlab.inria.fr/guix-hpc/guix-hpc.git"))
"https://guix.bordeaux.inria.fr"
#:spec "guix-hpc"))

The first channel-with-substitutes-available could use the commit M1
from the Savannah Guix master branch, while the second
channel-with-substitutes-available could use the commit H1 from the
HPC gitlab master branch.

If the commit H1 is evaluated by the Inria Cuirass against an older
Savannah Guix master commit let say M2, then "guix pull" will rebuild
the guix-hpc derivation I guess.

Maybe we need something that looks like:

Toggle snippet (10 lines)
(channels-with-substitutes-available
(list %default-guix-channel
(channel
(name 'guix-hpc)
(url "https://gitlab.inria.fr/guix-hpc/guix-hpc.git")))
(list "https://ci.guix.gnu.org"
"https://guix.bordeaux.inria.fr")
(specs "master" "guix-hpc"))

that would make sure to use a couple of Guix and HPC commits that
have been evaluated together on the Inria Cuirass server.

This looks more complex though :(

Mathieu
L
L
Ludovic Courtès wrote on 27 May 2021 11:20
(name . Mathieu Othacehe)(address . othacehe@gnu.org)(address . 48564@debbugs.gnu.org)
878s40r0ra.fsf@inria.fr
Heya,

Mathieu Othacehe <othacehe@gnu.org> skribis:

Toggle quote (8 lines)
>>> (define* (channel-with-substitutes-available chan url
>>> #:key
>>> (specification "master"))
>>
>
> I have fixed the evaluation complete? field issue with
> a2155f41f53eeb5000857e7160c5ad0916dc9bfa.

Good catch!

Toggle quote (40 lines)
> Regarding the idea we had, things are I fear a little more complex. If
> we consider what you would like to achieve:
>
> (list (channel-with-substitutes-available
> %default-guix-channel
> "https://ci.guix.gnu.org"
> #:spec "master")
> (channel-with-substitutes-available
> (channel
> (name 'guix-hpc)
> (url "https://gitlab.inria.fr/guix-hpc/guix-hpc.git"))
> "https://guix.bordeaux.inria.fr"
> #:spec "guix-hpc"))
>
>
> The first channel-with-substitutes-available could use the commit M1
> from the Savannah Guix master branch, while the second
> channel-with-substitutes-available could use the commit H1 from the
> HPC gitlab master branch.
>
> If the commit H1 is evaluated by the Inria Cuirass against an older
> Savannah Guix master commit let say M2, then "guix pull" will rebuild
> the guix-hpc derivation I guess.
>
> Maybe we need something that looks like:
>
> (channels-with-substitutes-available
> (list %default-guix-channel
> (channel
> (name 'guix-hpc)
> (url "https://gitlab.inria.fr/guix-hpc/guix-hpc.git")))
> (list "https://ci.guix.gnu.org"
> "https://guix.bordeaux.inria.fr")
> (specs "master" "guix-hpc"))
>
> that would make sure to use a couple of Guix and HPC commits that
> have been evaluated together on the Inria Cuirass server.
>
> This looks more complex though :(

Hmm yeah. Actually, in this example, it would make sense to take both
commits from guix.bordeaux.inria.fr, since that instance necessarily has
info about the two channels. But yeah, it remains a bit complex.

Thanks,
Ludo’.
Z
Z
zimoun wrote on 27 May 2021 22:34
(name . Mathieu Othacehe)(address . othacehe@gnu.org)
86o8cvncg2.fsf@gmail.com
Hi,

On Wed, 26 May 2021 at 16:17, Mathieu Othacehe <othacehe@gnu.org> wrote:

Toggle quote (9 lines)
> (channels-with-substitutes-available
> (list %default-guix-channel
> (channel
> (name 'guix-hpc)
> (url "https://gitlab.inria.fr/guix-hpc/guix-hpc.git")))
> (list "https://ci.guix.gnu.org"
> "https://guix.bordeaux.inria.fr")
> (specs "master" "guix-hpc"))

FWIW, I do not know if ’channels-with-substitutes-available’ should take
a list of channels, but it should take a list of substitute servers.
For instance, the user should be allowed to provide (list
"https://ci.guix.gnu.org" "https://bayfront.guix.gnu.org") for the
channel %default-guix-channel. And the default should be:

(channels-with-substitutes-available
%default-guix-channel
%default-substitute-urls)

Then, for multi-channels, the substitute servers should be a list of
list, IMHO. Although, in practise, currently, there is less substitute
servers than channels. ;-)


Cheers,
simon
?