Skip to content

fix: Stop retry transport retrying rate limited requests - #3655

Open
stevehipwell wants to merge 3 commits into
integrations:mainfrom
stevehipwell:fix-ghclient-retry
Open

stevehipwell wants to merge 3 commits into
integrations:mainfrom
stevehipwell:fix-ghclient-retry

Conversation

@stevehipwell

Copy link
Copy Markdown
Collaborator

Related to #3565


Before the change?

  • The new client retry logic incorrectly handled 429 responses
  • The rate limit transport was before the throttler which could result in rate limit bypass (which would compound the retry issue)

After the change?

  • The new client retry logic ignores 429 responses
  • The throttler now fully respects the rate limits

Pull request checklist

  • Schema migrations have been created if needed (example)
  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been reviewed and added / updated if needed (for bug fixes / features)

Does this introduce a breaking change?

Please see our docs on breaking changes to help!

  • Yes
  • No

@stevehipwell stevehipwell added this to the v6.14.0 milestone Sep 25, 2026
@stevehipwell stevehipwell self-assigned this Sep 25, 2026
@stevehipwell stevehipwell added the Type: Bug Something isn't working as documented label Sep 25, 2026
@github-actions

Copy link
Copy Markdown

👋 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.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 Medium severity · 1 Low severity

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.

Comment thread internal/ghclient/retry_test.go Outdated
Comment thread internal/ghclient/transport.go Outdated
Signed-off-by: Steve Hipwell <steve.hipwell@gmail.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🔵 Needs a closer look

The transport ordering lacks an integration-level regression test.

Review effort: Balanced
Findings: None

Resolved since last review (2)

@stevehipwell
stevehipwell requested a review from deiga September 25, 2026 14:49
@stevehipwell stevehipwell added the needs-github-review Request a review from GitHub label Sep 28, 2026
@team-review-router
team-review-router Bot requested a review from a team September 28, 2026 09:51
Comment thread internal/ghclient/transport.go Outdated

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟡 Changes recommended

Zero-delay configurations regress, empty cache paths bypass validation, and exhausted retries leak response bodies.

Review effort: Balanced
Findings: 1 High severity · 2 Medium severity

Open (3)

Comment thread internal/ghclient/retry.go Outdated
Comment thread internal/ghclient/cache.go Outdated
Comment thread internal/ghclient/retry.go

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 High severity · 3 Medium severity · 1 Low severity

Open (5)
Resolved since last review (2)

Comment thread internal/ghclient/transport.go
Comment thread github/provider.go Outdated
Comment thread internal/ghclient/retry.go
Comment thread internal/ghclient/transport.go

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 High severity · 1 Low severity

Open (2)
Resolved since last review (5)

Comment thread internal/ghclient/retry.go Outdated
Comment thread github/provider.go
Signed-off-by: Steve Hipwell <steve.hipwell@gmail.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🔵 Needs a closer look

The zero-delay compatibility workaround needs a provider-level regression test.

Review effort: Balanced
Findings: None

Resolved since last review (2)

Comment thread internal/ghclient/retry.go
Signed-off-by: Steve Hipwell <steve.hipwell@gmail.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟡 Changes recommended

Retried POST and GraphQL requests can send an empty body after the first attempt.

Review effort: Balanced
Findings: 1 High severity

Open (1)

Comment thread internal/ghclient/retry.go

@robert-crandall robert-crandall left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for working through the retry and rate-limit changes!

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs-github-review Request a review from GitHub Type: Bug Something isn't working as documented

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants