unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Re: 02/06: installer: Check if ci.guix.gnu.org can be reached.
       [not found] ` <20220114133129.E8757C0DA29@vcs2.savannah.gnu.org>
@ 2022-01-16 21:25   ` Ludovic Courtès
  0 siblings, 0 replies; only message in thread
From: Ludovic Courtès @ 2022-01-16 21:25 UTC (permalink / raw)
  To: guix-devel, Mathieu Othacehe

Hi,

guix-commits@gnu.org skribis:

> commit ee897e5f51104f41b3c2a0c2cbc7eb4e6c1e4d3e
> Author: Mathieu Othacehe <othacehe@gnu.org>
> AuthorDate: Tue Dec 28 11:19:55 2021 +0100
>
>     installer: Check if ci.guix.gnu.org can be reached.
>     
>     * gnu/installer.scm (installer-program): Add gnutls extension.
>     * gnu/installer/newt/network.scm (wait-service-online): Check if the CI server
>     can be reached.

[...]

> +  (define (ci-available?)
> +    (dynamic-wind
> +      (lambda ()
> +        (sigaction SIGALRM
> +          (lambda _ #f))
> +        (alarm 3))
> +      (lambda ()
> +        (false-if-exception
> +         (= (response-code
> +             (http-request "https://ci.guix.gnu.org"))
> +            200)))

What about replacing the hard-coded URL with a reference to
‘%default-substitute-urls’?

Since it’s a list, we could check that at least one of the URLs in that
list is reachable.

Also, perhaps replace ‘http-request’ (which does GET by default) by
‘http-head’?

My 2¢,
Ludo’.


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-01-16 21:26 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <164216708827.2218.4246826654687840555@vcs2.savannah.gnu.org>
     [not found] ` <20220114133129.E8757C0DA29@vcs2.savannah.gnu.org>
2022-01-16 21:25   ` 02/06: installer: Check if ci.guix.gnu.org can be reached Ludovic Courtès

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).