abiosoft / abiosoft/colima

Provide clearer errors during image retreival

Offen
#1,135 2 Kommentare 1 Reaktion 0 zugewiesene Personen Auf GitHub ansehen
Vorherrschende Sprache
Go
Sterne
30.8k
Forks
613
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

### Description

TL;DR It would be helpful if Colima surfaced errors from curl better or nudged the user to search for an error code in an underlying dependency.

A Colima user I'm helping encountered this error:

```
time="2024-09-09T16:19:44+05:30" level=fatal msg="error starting vm: error at 'creating and starting': error getting qcow image: error during image download: error downloading 'https://github.com/abiosoft/colima-core/releases/download/v0.7.1/ubuntu-24.04-minimal-cloudimg-arm64-docker.qcow2': error retrieving redirect url: error running [curl -ILs -o /dev/null -w %{url_effective} https://github.com/abiosoft/colima-core/releases/download/v0.7.1/ubuntu-24.04-minimal-cloudimg-arm64-docker.qcow2], output: \"\", err: \"exit status 60\""
```

The error message did not readily indicate what happened. The user tried standard troubleshooting steps, as simple as "turn it off and on again," to reconfiguring our company's corporate VPN software (but not including reconfiguring TLS certs…).

I dumbly searched for `curl exit status 60` and found that it's [curl's invalid TLS certificate chain error](https://duckduckgo.com/?t=ffab&q=curl+exit+60&atb=v310-1&ia=web). The user will likely fix their problem after correcting our corporate proxy TLS certificates.

If Colima was using a Go HTTP client, that error would propagate upward with a finer-grained error than simply a return code from the exec'd subprocess.

https://github.com/abiosoft/colima/blob/49b2384847436fea0278c14acb1de61249c92ca7/util/downloader/download.go#L135-L138

Beitragsleitfaden

Für dieses Repository ist kein Beitragsleitfaden indexiert

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.