Skip to content

[FEAT]: Bypass preemptive rate limit check by go-github #2709

Description

@kishaningithub

Describe the need

The go-github library performs a preemptive rate limit check and prevents requests from happening when rate limit conditions are met and this provider in its transport logic performs a retry during rate limit scenario as well.

In a highly concurrent scenario where multiple terrafom plans are running in CI using the same github token the rate limit of 5000 per hour per user gets exhaused very fast and due to the premptive check some of the requests fail and some wait till the hour (rate limit rest time) has passed.

Proposal

Toggle off bypassRateLimitCheck context variable when passing in context to go-github library and make the rate limit logic at the transport layer of this provider be the only logic that is present

SDK Version

No response

API Version

No response

Relevant log output

Code of Conduct

  • I agree to follow this project's Code of Conduct

Activity

  1. added
    Type: Feature
    Status: Triage
    on Jul 24, 2025
  2. kishaningithub commented on Jul 24, 2025

    @kishaningithub
    Author

    Related thread from go-github library - google/go-github#3386

  3. kishaningithub commented on Jul 24, 2025

    @kishaningithub
    Author

    In the latest version of the go-github SDK we now have the ability to completely disable this preemptive rate limit check at a global level

    https://github.com/google/go-github/pull/3607/files

  4. mkushakov commented on Sep 11, 2025

    @mkushakov
  5. stevehipwell commented on Oct 23, 2025

    @stevehipwell
    Collaborator

    I'd like to see us switch over to gofri/go-github-ratelimit to make use of the new DisableRateLimitCheck global flag in the SDK. I also don't think we need to make this optional.

  6. kishaningithub commented on Jan 28, 2026

    @kishaningithub
    Author

    @stevehipwell Would you be open to deprecating some of these configurations in the provider(screenshot below)?

    Link: https://registry.terraform.io/providers/integrations/github/latest/docs

    Screenshot
    Image

  7. kishaningithub commented on Jan 28, 2026

    @kishaningithub
    Author
  8. stevehipwell commented on Jan 28, 2026

    @stevehipwell
    Collaborator

    @kishaningithub I'd like to rework the whole transport pattern to make parallel requests using gofri/go-github-ratelimit & bored-engineer/github-conditional-http-transport. This should allow for the removal of the artificial delays (subject to testing) and the removal of the etag logic from the business logic code. I'd also like to remove all other custom transport changes such as the current error retries logic for a more idiomatic pattern.

    I wouldn't be adverse to looking at an automated retry implementation after the transport has been refactored, but I think we need to get the basic transport functionality fixed first.

  9. added a commit that references this issue on Feb 27, 2026
    ec32ac7
  10. moved this from Backlog to In Progress in Terraform Provideron Feb 27, 2026
  11. moved this from In Progress to Done in Terraform Provideron Jun 4, 2026
  12. moved this from 🆕 Triage to ✅ Done in 🧰 Octokit Activeon Jun 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Status: TriageType: Feature

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions