guix pull fails on http status code 503

  • Open
  • quality assurance status badge
Details
3 participants
  • André A. Gomes
  • Maxime Devos
  • zimoun
Owner
unassigned
Submitted by
André A. Gomes
Severity
normal
A
A
André A. Gomes wrote on 3 Sep 2022 13:21
(address . bug-guix@gnu.org)
87wnakn1oq.fsf@gmail.com
Hi Guix,

Toggle snippet (5 lines)
$ guix pull
Updating channel 'nonguix' from Git repository at 'https://gitlab.com/nonguix/nonguix'...
guix pull: error: Git error: unexpected http status code: 503

It seems reasonable that if a certain channel isn't available, it should
be possible to ignore it and proceed.

Thanks.


--
André A. Gomes
"You cannot even find the ruins..."
M
M
Maxime Devos wrote on 3 Sep 2022 19:27
dfcfd3df-9083-c63d-94c8-0d310806cc92@telenet.be
On 03-09-2022 13:21, André A. Gomes wrote:
Toggle quote (12 lines)
> Hi Guix,
>
> --8<---------------cut here---------------start------------->8---
> $ guix pull
> Updating channel 'nonguix' from Git repository at 'https://gitlab.com/nonguix/nonguix'...
> guix pull: error: Git error: unexpected http status code: 503
> --8<---------------cut here---------------end--------------->8---
>
> It seems reasonable that if a certain channel isn't available, it should
> be possible to ignore it and proceed.
>
> Thanks.
More concretely:
* if all channels are available --> ok, keep status quo
* if no channels are available --> error, keep status quo
* if some but not all channels are available, and there is at least
one updated channel --> log the missing channels, and update the
channels that _are_ available (but don't 'ignore' the missing
channels by removing them!).
* if some but not all channels are available, and none of the
available channels were updated --> bail out, no progress was made
and this might be due to lack of connectivity instead of lack of
updates.
?
Technically, your message can be interpreted as: if I only have a single
channel, the Guix channel, and it isn't available, it should be possible
to ignore it and proceed. (Proceed with what? It's the only channel,
what is there to proceed with.)  To actually implement this, we need to
be precise.
Greetings,
Maxime
Attachment: file
Attachment: OpenPGP_signature
A
A
André A. Gomes wrote on 4 Sep 2022 22:27
(name . Maxime Devos)(address . maximedevos@telenet.be)(address . 57559@debbugs.gnu.org)
87sfl6nawa.fsf@gmail.com
Maxime Devos <maximedevos@telenet.be> writes:

Toggle quote (20 lines)
> More concretely:
>
> * if all channels are available --> ok, keep status quo
> * if no channels are available --> error, keep status quo
> * if some but not all channels are available, and there is at least one
> updated channel --> log the missing channels, and update the channels
> that _are_ available (but don't 'ignore' the missing channels by
> removing them!).
> * if some but not all channels are available, and none of the available
> channels were updated --> bail out, no progress was made and this
> might be due to lack of connectivity instead of lack of updates.
>
> ?
>
> Technically, your message can be interpreted as: if I only have a single
> channel, the Guix channel, and it isn't available, it should be possible
> to ignore it and proceed. (Proceed with what? It's the only channel,
> what is there to proceed with.) To actually implement this, we need to
> be precise.

I'm just a user and unfortunately I don't have a deep understanding of
Guix's internals.

Your concrete description seems to resonate with my expectations.

Thanks.

--
André A. Gomes
"You cannot even find the ruins..."
Z
Z
zimoun wrote on 5 Sep 2022 10:21
87wnais03f.fsf@gmail.com
Hi Maxime,

On sam., 03 sept. 2022 at 19:27, Maxime Devos <maximedevos@telenet.be> wrote:

Toggle quote (5 lines)
> * if some but not all channels are available, and there is at least
> one updated channel --> log the missing channels, and update the
> channels that _are_ available (but don't 'ignore' the missing
> channels by removing them!).

What do you mean by «but don't 'ignore' the missing channels by removing
them!»? Do you mean keep the last revision locally known for this
channel?


Cheers,
simon
M
M
Maxime Devos wrote on 5 Sep 2022 22:20
745d4a98-fe62-338d-7a26-d5248413ff5f@telenet.be
On 05-09-2022 10:21, zimoun wrote:
Toggle quote (9 lines)
> On sam., 03 sept. 2022 at 19:27, Maxime Devos<maximedevos@telenet.be> wrote:
>
>> * if some but not all channels are available, and there is at least
>> one updated channel --> log the missing channels, and update the
>> channels that_are_ available (but don't 'ignore' the missing
>> channels by removing them!).
> What do you mean by «but don't 'ignore' the missing channels by removing
> them!»? Do you mean keep the last revision locally known for this
> channel?
I'm not sure what you're asking, because of the negatives.
With "but don't ignore [...] by [...]", I meant that, yes.
If you meant "don't ignore [...] by [...]", then no, with 'ignoring by
removing', I meant, literally removing them.  More concretely, a
situation like this:
* In the channels.scm, two channels are declared: guix and guix-foo.
* User does "guix pull"; Guix downloads the source code of guix and
guix-foo.
* Downloading guix failed (503).  As such, Guix decided to ignore the
guix channel, by removing it from the list of channels to build.
(The in-memory list I mean, I don't mean modifying the channels.smc
file)
* Guix tries building the guix-foo channel and installing it, without
the guix channel.
* This cannot work (the guix-foo channel uses modules from guix for
basic stuff like G-exps, packages, coreutils, ..., and it was the
removed guix channel that had things build-aux/build-self.scm which
is required for pulling).
(It's not unlike double negatives! I first thought of the latter
interpretation but on second thought you might have meant the former.)
Greetings,
Maxime.
Attachment: file
Attachment: OpenPGP_signature
Z
Z
zimoun wrote on 6 Sep 2022 15:09
86wnagzm1v.fsf@gmail.com
Hi Maxime,

On Mon, 05 Sep 2022 at 22:20, Maxime Devos <maximedevos@telenet.be> wrote:
Toggle quote (13 lines)
> On 05-09-2022 10:21, zimoun wrote:
>> On sam., 03 sept. 2022 at 19:27, Maxime Devos<maximedevos@telenet.be> wrote:
>>
>>> * if some but not all channels are available, and there is at least
>>> one updated channel --> log the missing channels, and update the
>>> channels that_are_ available (but don't 'ignore' the missing
>>> channels by removing them!).
>> What do you mean by «but don't 'ignore' the missing channels by removing
>> them!»? Do you mean keep the last revision locally known for this
>> channel?
>
> I'm not sure what you're asking, because of the negatives.

[...]

Toggle quote (3 lines)
> (It's not unlike double negatives! I first thought of the latter
> interpretation but on second thought you might have meant the former.)

IIUC, you have hard time to parse the double-negative you wrote earlier
in this thread. :-)



Toggle quote (20 lines)
> With "but don't ignore [...] by [...]", I meant that, yes.
>
> If you meant "don't ignore [...] by [...]", then no, with 'ignoring by
> removing', I meant, literally removing them.  More concretely, a
> situation like this:
>
> * In the channels.scm, two channels are declared: guix and guix-foo.
> * User does "guix pull"; Guix downloads the source code of guix and
> guix-foo.
> * Downloading guix failed (503).  As such, Guix decided to ignore the
> guix channel, by removing it from the list of channels to build.
> (The in-memory list I mean, I don't mean modifying the channels.smc
> file)
> * Guix tries building the guix-foo channel and installing it, without
> the guix channel.
> * This cannot work (the guix-foo channel uses modules from guix for
> basic stuff like G-exps, packages, coreutils, ..., and it was the
> removed guix channel that had things build-aux/build-self.scm which
> is required for pulling).

The initial report by André is about:

Toggle snippet (5 lines)
$ guix pull
Updating channel 'nonguix' from Git repository at 'https://gitlab.com/nonguix/nonguix'...
guix pull: error: Git error: unexpected http status code: 503

So the situation is more likely: Guix from Savannah is reachable and
guix-foo is not.

For sure, we can discuss the case when Guix is unavailable. However,
the 'guix channel is special; see all conditionals using ’guix-channel?’.

Well, %default-guix-channel is somehow a corner use-case when the
regular use-case seems about a failure of additional channels.


Cheers,
simon
M
M
Maxime Devos wrote on 8 Sep 2022 02:55
e0db8bcd-e622-84a7-5488-bcebc9cebc51@telenet.be
On 06-09-2022 15:09, zimoun wrote:
Toggle quote (16 lines)
> The initial report by André is about:
>
> --8<---------------cut here---------------start------------->8---
> $ guix pull
> Updating channel 'nonguix' from Git repository at 'https://gitlab.com/nonguix/nonguix'...
> guix pull: error: Git error: unexpected http status code: 503
> --8<---------------cut here---------------end--------------->8---
>
> So the situation is more likely: Guix from Savannah is reachable and
> guix-foo is not.
>
> For sure, we can discuss the case when Guix is unavailable. However,
> the 'guix channel is special; see all conditionals using ’guix-channel?’.
>
> Well, %default-guix-channel is somehow a corner use-case when the
> regular use-case seems about a failure of additional channels.
The ‘Guix is unavailable’ was just a simple example. For the example,
you can replace it, with, say nonguix. Automatically removing the
additional channels upon 503 is undesirable I'd think, though the error
messages will be different.
Greetings,
Maixme.
Attachment: OpenPGP_signature
Z
Z
zimoun wrote on 8 Sep 2022 09:25
86k06exr86.fsf@gmail.com
Hi Maxime,

On Thu, 08 Sep 2022 at 02:55, Maxime Devos <maximedevos@telenet.be> wrote:

Toggle quote (8 lines)
>> Well, %default-guix-channel is somehow a corner use-case when the
>> regular use-case seems about a failure of additional channels.
>
> The ‘Guix is unavailable’ was just a simple example. For the example,
> you can replace it, with, say nonguix. Automatically removing the
> additional channels upon 503 is undesirable I'd think, though the error
> messages will be different.

My point is that ’Guix is unavailable’ is special and it appears to me
expected to raise an error. Other said,

1. if %default-guix-channel (or its mirrors) is unreachable,
then stop the pull; as it is currently done.
2. if an extra channel is unreachable,
then keep the last local revision of this channel
and try the others.

For sure, #2 can break the whole pull if something in the Guix channel
changed *and* the channel depends on this something. But we cannot do
more than raise an error.


Cheers,
simon
M
M
Maxime Devos wrote on 8 Sep 2022 11:23
da06e8df-95b2-f56e-fa1d-330f977de38e@telenet.be
On 08-09-2022 09:25, zimoun wrote:
Toggle quote (12 lines)
> My point is that ’Guix is unavailable’ is special and it appears to me
> expected to raise an error. Other said,
>
> 1. if %default-guix-channel (or its mirrors) is unreachable,
> then stop the pull; as it is currently done.
> 2. if an extra channel is unreachable,
> then keep the last local revision of this channel
> and try the others.
>
> For sure, #2 can break the whole pull if something in the Guix channel
> changed*and* the channel depends on this something. But we cannot do
> more than raise an error.
Looking at 'latest-channel-instances', the code for deciding what the
latest version is, is the same for the guix channel and any other
channel.  As such, the 'Guix is unavailable' is, currently, not special.
I suppose we could special-case it in latest-channel-instances to raise
an error when Guix is unavailable, but I don't see why -- sometimes
Savannah is down, would be nice to then at least be able to update
the other channels.
Greetings,
Maxime.
Attachment: OpenPGP_signature
Z
Z
zimoun wrote on 8 Sep 2022 13:11
86v8pyw26k.fsf@gmail.com
Hi Maxime,

On Thu, 08 Sep 2022 at 11:23, Maxime Devos <maximedevos@telenet.be> wrote:

Toggle quote (4 lines)
> Looking at 'latest-channel-instances', the code for deciding what the
> latest version is, is the same for the guix channel and any other
> channel.  As such, the 'Guix is unavailable' is, currently, not special.

Well, ’latest-channel-instances’ relies on ’latest-channel-instance’
which tests ’guix-channel?’,

Toggle snippet (5 lines)
(define (guix-channel? channel)
"Return true if CHANNEL is the 'guix' channel."
(eq? 'guix (channel-name channel)))

then, for instance, the occurrences are:

Toggle snippet (15 lines)
12 candidates:
./guix/channels.scm:79: guix-channel?
./guix/channels.scm:192:(define (guix-channel? channel)
./guix/channels.scm:199: (if (and (guix-channel? chan)
./guix/channels.scm:424: (when (guix-channel? channel)
./guix/channels.scm:437: (when (guix-channel? channel)
./guix/channels.scm:778: (guix-channel? (channel-instance-channel instance)))
./guix/channels.scm:903: (item (if (guix-channel? channel)
./guix/scripts/pull.scm:775: (match (find guix-channel? channels)
./guix/scripts/pull.scm:788: (remove guix-channel? channels))))
./gnu/packages/package-management.scm:125: guix-channel?
./gnu/packages/package-management.scm:618: (delay (match (or (find guix-channel? (current-channels))
./gnu/ci.scm:478: (find guix-channel? channels))

And my point is that the Guix channel is special when pulling.
Therefore, we could split the cases when the Guix channel is unreachable
and when other extra-channels are unreachable; because the impact are
different, IMHO.

As I pointed earlier in the thread, the main issue is when these extra
channels are unreachable; as André have initially reported.


Cheers,
simon
M
M
Maxime Devos wrote on 8 Sep 2022 13:29
6d3d74a2-2650-c077-d253-bfcaefbb65ec@telenet.be
On 08-09-2022 13:11, zimoun wrote:
Toggle quote (15 lines)
> Hi Maxime,
>
> On Thu, 08 Sep 2022 at 11:23, Maxime Devos <maximedevos@telenet.be> wrote:
>
>> Looking at 'latest-channel-instances', the code for deciding what the
>> latest version is, is the same for the guix channel and any other
>> channel.  As such, the 'Guix is unavailable' is, currently, not special.
> Well, ’latest-channel-instances’ relies on ’latest-channel-instance’
> which tests ’guix-channel?’,
>
> --8<---------------cut here---------------start------------->8---
> (define (guix-channel? channel)
> "Return true if CHANNEL is the 'guix' channel."
> (eq? 'guix (channel-name channel)))
> --8<---------------cut here---------------end--------------->8---
That's only for channel authentication and patches, not relevant for
this bug#57559.
Toggle quote (19 lines)
> then, for instance, the occurrences are:
>
> --8<---------------cut here---------------start------------->8---
> 12 candidates:
> ./guix/channels.scm:79: guix-channel?
> ./guix/channels.scm:192:(define (guix-channel? channel)
> ./guix/channels.scm:199: (if (and (guix-channel? chan)
> ./guix/channels.scm:424: (when (guix-channel? channel)
> ./guix/channels.scm:437: (when (guix-channel? channel)
> ./guix/channels.scm:778: (guix-channel? (channel-instance-channel instance)))
> ./guix/channels.scm:903: (item (if (guix-channel? channel)
> ./guix/scripts/pull.scm:775: (match (find guix-channel? channels)
> ./guix/scripts/pull.scm:788: (remove guix-channel? channels))))
> ./gnu/packages/package-management.scm:125: guix-channel?
> ./gnu/packages/package-management.scm:618: (delay (match (or (find guix-channel? (current-channels))
> ./gnu/ci.scm:478: (find guix-channel? channels))
> --8<---------------cut here---------------end--------------->8---
>
> And my point is that the Guix channel is special when pulling.
It is special for some things, yes, but it isn't special for deciding
what is the latest version. These occurrences are for channel
authentication,
patching, building, Cuirass and the 'guix' package, not for deciding
what is to be considered the latest available version of the channel
Toggle quote (3 lines)
> Therefore, we could split the cases when the Guix channel is unreachable
> and when other extra-channels are unreachable; because the impact are
> different, IMHO.
In principle, we could, but I don't see the point. Solving things for
the case
where the unavailable channel is Guix is no more complicated than for other
channels.
Toggle quote (2 lines)
> As I pointed earlier in the thread, the main issue is when these extra
> channels are unreachable; as André have initially reported.
This might be the main issue, yes, but I still don't see the point of
treating
'guix' specially for the puposes of #57559.  It would make the semantics of
"guix pull" and its implementation more complex, for no apparent purpose
AFAICT (solving the general issue would solve the main issue, right?).
About the complexity of the implementation: as mentioned previously,
latest-channel-instances doesn't treat the Guix channel specially
(the authentication check and patches isn't relevant here), so adding an
additional (if (guix-channel?) ...) would add complexity (and hence, require
additional testing and maybe documentation).
Greetings,
Maxime.
Attachment: OpenPGP_signature
A
A
André A. Gomes wrote on 2 Jul 18:09 +0200
(address . 57559@debbugs.gnu.org)
87msmzixn7.fsf@gmail.com
André A. Gomes <andremegafone@gmail.com> writes:

Toggle quote (9 lines)
> Hi Guix,
>
> $ guix pull
> Updating channel 'nonguix' from Git repository at 'https://gitlab.com/nonguix/nonguix'...
> guix pull: error: Git error: unexpected http status code: 503
>
> It seems reasonable that if a certain channel isn't available, it should
> be possible to ignore it and proceed.

Hi Guix,

In the same spirit as the report above, invoking guix pull replied:

Toggle snippet (6 lines)
Updating channel 'nonguix' from Git repository at 'https://gitlab.com/nonguix/nonguix'...
Updating channel 'aadcg' from Git repository at 'https://github.com/aadcg/aadcg-guix-channel'...
Updating channel 'guix' from Git repository at 'https://git.savannah.gnu.org/git/guix.git'...
guix pull: error: Git error: unexpected http status code: 502

I'd would be helpful to see which channel failed and continue the
operation with the channels that are operational.

Thanks.


--
André A. Gomes
"You cannot even find the ruins..."
?
Your comment

Commenting via the web interface is currently disabled.

To comment on this conversation send an email to 57559@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 57559
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch