From: "Ludovic Courtès" <ludo@gnu.org>
To: Leo Famulari <leo@famulari.name>
Cc: guix-devel@gnu.org
Subject: Re: guix weather exit status?
Date: Sat, 10 Jul 2021 16:41:44 +0200 [thread overview]
Message-ID: <87r1g6b593.fsf@gnu.org> (raw)
In-Reply-To: <YOdhd7FfMOvKjTQe@jasmine.lan> (Leo Famulari's message of "Thu, 8 Jul 2021 16:35:03 -0400")
Hi!
Leo Famulari <leo@famulari.name> skribis:
> When a substitute is not available for all specified substitute servers,
> `guix weather` exits with a return code of '1', signaling failure.
>
> For example:
>
> ------
> $ ./pre-inst-env guix weather linux-libre; echo $?
> computing 1 package derivations for x86_64-linux...
> looking for 1 store items on http://ci.guix.gnu.org...
> http://ci.guix.gnu.org
> 100.0% substitutes available (1 out of 1)
> at least 234.8 MiB of nars (compressed)
> 86.3 MiB on disk (uncompressed)
>
> 38 queued builds
> aarch64-linux: 31 (81.6%)
> powerpc64le-linux: 1 (2.6%)
> armhf-linux: 1 (2.6%)
> i686-linux: 5 (13.2%)
> build rate: .00 builds per hour
> x86_64-linux: 0.00 builds per hour
> aarch64-linux: 0.00 builds per hour
> i686-linux: 0.00 builds per hour
> looking for 1 store items on http://bordeaux.guix.gnu.org...
> http://bordeaux.guix.gnu.org
> 0.0% substitutes available (0 out of 1)
> unknown substitute sizes
> 0.0 MiB on disk (uncompressed)
> (continuous integration information unavailable)
> 1
> ------
>
> I expected it to return successfully because a substitute is available,
> but I see that it could also make sense if "success" means that a
> substitute is available from all servers.
Quoth the manual (info "(guix) Invoking guix weather"):
‘guix weather’ exits with a non-zero code when the fraction of
available substitutes is below 100%.
> However, the current behaviour breaks the use case of "wait until a
> substitute is available and then download it", like this for example:
>
> $ while true; do guix weather linux-libre && break; sleep 600; done; guix build --no-grafts linux-libre
>
> I'm not sure if this topic was discussed previously... your thoughts?
I agree we could change (or rather refine) semantics to exit with
non-zero when overall coverage is below 100%. In the example above, it
should return 0.
Thanks,
Ludo’.
next prev parent reply other threads:[~2021-07-10 14:42 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-07-08 20:35 guix weather exit status? Leo Famulari
2021-07-10 14:41 ` Ludovic Courtès [this message]
2021-07-10 22:06 ` Leo Famulari
2021-07-11 8:40 ` zimoun
2021-07-11 13:23 ` Kaelyn
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=87r1g6b593.fsf@gnu.org \
--to=ludo@gnu.org \
--cc=guix-devel@gnu.org \
--cc=leo@famulari.name \
/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).