subo icon indicating copy to clipboard operation
subo copied to clipboard

Hide the intermittent getLatestVersion errors

Open flaki opened this issue 3 years ago • 2 comments

Subo intermittently throws this notice:

ℹ️  failed to getLatestVersion: failed to fetch latest subo release: context deadline exceeded

This is due to us synchronously checking for updated subo releases and the server not responding within the deadline. We should make this check even more asynchronous, and remove this notice from production builds (it is confusing, and the user cannot really do anything about it anyway).

@jagger27 proposed to make these checks fully asynchronous and not wait for their results (but show a notice if the last check found a newer version on the next run). In these cases we can also use the failure state (now unbound from the short completion deadline) as an actual metric we collect and send back via telemetry to report potential breakage.

flaki avatar May 18 '22 19:05 flaki

I just got one of these as well:

ℹ️  failed to getLatestVersion: failed to fetch latest subo release: GET https://api.github.com/repos/suborbital/subo/releases/latest: 403 API rate limit exceeded for 174.115.111.169. (But here's the good news: Authenticated requests get a higher rate limit. Check out the documentation for more details.) [rate reset in 7m20s]

arbourd avatar May 19 '22 16:05 arbourd

Yeah we should probably at least have a file that has a timestamp of last check and we don't do it more than every couple hours (that would go well with @jagger27's proposal of doing this async as you can also just serialize into the file the latest found version, which could be compared with the current version on next run)

flaki avatar May 19 '22 16:05 flaki