[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug#54241] [PATCH 0/4] 'github' importer gracefully handles rate limiti
From: |
Maxime Devos |
Subject: |
[bug#54241] [PATCH 0/4] 'github' importer gracefully handles rate limiting |
Date: |
Sat, 05 Mar 2022 23:21:03 +0100 |
User-agent: |
Evolution 3.38.3-1 |
Ludovic Courtès schreef op za 05-03-2022 om 23:03 [+0100]:
> Maxime Devos <maximedevos@telenet.be> skribis:
>
> > Ludovic Courtès schreef op do 03-03-2022 om 22:14 [+0100]:
> > > +(define (update-rate-limit-reset-time! headers)
> > > + "Update the rate limit reset time based on HEADERS, the HTTP response
> > > +headers."
> > > + (match (assq-ref headers 'x-ratelimit-reset)
> > > + ((= string->number (? number? reset))
> > > + (set! %rate-limit-reset-time reset)
> > > + reset)
> > > + (_
> > > + 0)))
> >
> > When can this second case happen?
>
> I don’t know if it’s supposed to happen. It’s defensive programming:
> better keep going than crash if the server starts behaving slightly
> differently.
If it's not supposed to happen, can it at least be reported with a
warning, such that we then know that 'update-rate-limit-reset-time!'
needs to be extended or GitHub needs to be contacted?
FWIW, I think crashing in case of bogus HTTP answers is fine, as long
as it crashes with a _nice_ error message ("guix: error: HTTP server
foo.com returned an unrecoginised X-Ratelimit-Reset $SOME_STRING" or
something like that) instead of some vague backtrace.
Greetings,
Maxime.
signature.asc
Description: This is a digitally signed message part
- [bug#54241] [PATCH 2/4] import: github: Gracefully handle rate limit exhaustion., (continued)
- [bug#54241] [PATCH 2/4] import: github: Gracefully handle rate limit exhaustion., Maxime Devos, 2022/03/05
- [bug#54241] [PATCH 0/4] 'github' importer gracefully handles rate limiting, Ludovic Courtès, 2022/03/05
- [bug#54241] [PATCH 2/4] import: github: Gracefully handle rate limit exhaustion., Maxime Devos, 2022/03/05
- [bug#54241] [PATCH 0/4] 'github' importer gracefully handles rate limiting, Ludovic Courtès, 2022/03/05
- [bug#54241] [PATCH 2/4] import: github: Gracefully handle rate limit exhaustion., Maxime Devos, 2022/03/05
- [bug#54241] [PATCH 0/4] 'github' importer gracefully handles rate limiting, Ludovic Courtès, 2022/03/05
- [bug#54241] [PATCH 0/4] 'github' importer gracefully handles rate limiting, Maxime Devos, 2022/03/05
- [bug#54241] [PATCH 0/4] 'github' importer gracefully handles rate limiting, Ludovic Courtès, 2022/03/06
- [bug#54241] [PATCH 0/4] 'github' importer gracefully handles rate limiting,
Maxime Devos <=
- [bug#54241] [PATCH 2/4] import: github: Gracefully handle rate limit exhaustion., Maxime Devos, 2022/03/05
- [bug#54241] [PATCH 0/4] 'github' importer gracefully handles rate limiting, Ludovic Courtès, 2022/03/05
[bug#54241] [PATCH 0/4] 'github' importer gracefully handles rate limiting, Maxime Devos, 2022/03/04
- [bug#54241] [PATCH 0/4] 'github' importer gracefully handles rate limiting, Ludovic Courtès, 2022/03/04
- [bug#54241] [PATCH 0/4] 'github' importer gracefully handles rate limiting, Maxime Devos, 2022/03/05
- [bug#54241] [PATCH 0/4] 'github' importer gracefully handles rate limiting, Ludovic Courtès, 2022/03/05
- [bug#54241] [PATCH 0/4] 'github' importer gracefully handles rate limiting, Maxime Devos, 2022/03/05
- [bug#54241] [PATCH 0/4] 'github' importer gracefully handles rate limiting, Maxime Devos, 2022/03/05
- [bug#54241] [PATCH 0/4] 'github' importer gracefully handles rate limiting, Ludovic Courtès, 2022/03/06