fix: Stop retry transport retrying rate limited requests - #3655
stevehipwell wants to merge 3 commits into
Conversation
|
👋 Hi, and thank you for this contribution! This repo is maintained by GitHub and community members on a best-effort basis. We'll get to this as soon as we can. You can help us prioritize by joining the discussion on open issues and PRs, sharing details on the changes you need, and reviewing other contributions. 🤖 This is an automated message. |
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
The error assertion is inverted, and the transport-order regression lacks combined coverage.
Get a fresh assessment by requesting another Copilot review.
Review effort: Balanced
Findings: 1
Open (2)
What changed in this PR
These provider review instructions are being used.
This PR corrects rate-limit handling in the GitHub HTTP transport.
Changes:
- Excludes HTTP 429 responses from generic retries.
- Reorders rate-limit and throttling transports.
- Extracts callbacks and adds retry-policy tests.
| File | Description |
|---|---|
internal/ghclient/transport.go |
Reorders transports and installs the retry policy. |
internal/ghclient/retry.go |
Adds the 429-aware retry policy. |
internal/ghclient/retry_test.go |
Tests retry-policy behavior. |
internal/ghclient/ratelimit.go |
Houses rate-limit logging callbacks. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Signed-off-by: Steve Hipwell <steve.hipwell@gmail.com>
6da080f to
3b1022d
Compare
f79209f to
38c148a
Compare
38c148a to
d22e60b
Compare
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
Zero-delay configuration, disabled-retry body replay, and portions of the prior 5xx retry behavior currently regress.
Review effort: Balanced
Findings: 1
Open (5)
Support request-body replay when generic retries are disabled · New Get defaulted retry delay with Get instead of GetOk · New Preserve broad 5xx retries while excluding 501 and 429 · New Preserve zero-delay retry configuration Test rate-limit retries remain constrained by the throttling semaphore · New
Resolved since last review (2)
d22e60b to
f158e21
Compare
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
The shared stateful backoff breaks retry limits across requests, and the zero-delay compatibility path lacks regression coverage.
Review effort: Balanced
Findings: 1
Open (2)
Resolved since last review (5)
Signed-off-by: Steve Hipwell <steve.hipwell@gmail.com>
f158e21 to
6dde8bd
Compare
Signed-off-by: Steve Hipwell <steve.hipwell@gmail.com>
robert-crandall
left a comment
There was a problem hiding this comment.
Thanks for working through the retry and rate-limit changes!



Related to #3565
Before the change?
After the change?
Pull request checklist
Does this introduce a breaking change?
Please see our docs on breaking changes to help!