diff options
author | Ludovic Courtès <[email protected]> | 2022-03-03 17:35:21 +0100 |
---|---|---|
committer | Ludovic Courtès <[email protected]> | 2022-03-06 22:49:47 +0100 |
commit | 55e8e283ae398cc476e50e822383797c5f43db4c (patch) | |
tree | d2d6b3b5b660dcd9e54684cf5ca5b2b4aa7f250f /gnu/packages/gnome-xyz.scm | |
parent | ecad9b221364c5c941385eaac3a652e2bd42d1ac (diff) |
import: github: Gracefully handle rate limit exhaustion.
Previously, 'guix refresh' would literally crash when the rate limit was
reached due to the call to 'error'. With this change, the updater
notices when the rate limit is reached and it turns itself into a no-op
until the rate limit has been reset.
When running "guix refresh" (with no arguments), the 'github' updater
gets used until the rate limit has been reached, after which "guix
refresh" automatically picks up the next valid updater, typically
'generic-git'.
* guix/import/github.scm (fetch-releases-or-tags): Use 'http-fetch'
directly instead of 'json-fetch' to let 'http-get-error?' exceptions
through. Handle 403 errors with an 'X-RateLimit-Remaining' header.
(%rate-limit-reset-time): New variable.
(update-rate-limit-reset-time!, request-rate-limit-reached?): New
procedures.
(latest-released-version): Remove calls to 'error'.
Diffstat (limited to 'gnu/packages/gnome-xyz.scm')
0 files changed, 0 insertions, 0 deletions