Handle exceeding Github rate limits
评估
调研方向
Issue 中没有指定文件或测试。首先定位客户端的 REST 和 GraphQL 请求入口以及现有的错误处理。定义可配置的重试应如何使用速率限制标头和退避指导,然后添加覆盖,展示受到速率限制的请求会根据配置等待或失败。
由索引模型根据 Issue 内容生成。
描述
If you exceed your primary rate limit, you will receive a 403 or 429 response, and the x-ratelimit-remaining header will be 0. You should not retry your request until after the time specified by the x-ratelimit-reset header.
If you exceed a secondary rate limit, you will receive a 403 or 429 response and an error message that indicates that you exceeded a secondary rate limit. If the retry-after response header is present, you should not retry your request until after that many seconds has elapsed. If the x-ratelimit-remaining header is 0, you should not retry your request until after the time, in UTC epoch seconds, specified by the x-ratelimit-reset header. Otherwise, wait for at least one minute before retrying. If your request continues to fail due to a secondary rate limit, wait for an exponentially increasing amount of time between retries, and throw an error after a specific number of retries.
Continuing to make requests while you are rate limited may result in the banning of your integration.
It would be nice if simple-github automatically handled this for consumers, though the behaviour should be configurable as there may be cases where consumers would rather schedule other work instead of waiting for the rate limit to grow again.
- 主要语言
- Python
- 星标
- 3
- 派生
- 8
- 平均合并
- 1 天 3 小时
- 30 天内合并 PR
- 7
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
mozilla-releng/simple-github 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 72/100
mozilla-releng/simple-github#196 · 1 条评论 ·
-
难度 5/5 一周以上 新手友好度 20/100
-
难度 4/5 3-5 天 新手友好度 35/100
查看 mozilla-releng/simple-github 的全部 Issue
相似的 Issue
-
area:space-accuracy good first issue track:data
难度 2/5 1-3 小时 新手友好度 85/100
Sara-Managed-Projects/space-radar#904 ·
维护者通常 1 天内回复