You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[FEAT]: Bypass preemptive rate limit check by go-github #2709
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
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.
@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.
Activity
kishaningithub commentedon Jul 24, 2025
Related thread from go-github library - google/go-github#3386
kishaningithub commentedon Jul 24, 2025
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
mkushakov commentedon Sep 11, 2025
We have implemented modern rate-limited in our forked terraform provider
https://registry.terraform.io/providers/nexthink-oss/github/latest/docs#rate_limiter-2
nexthink-oss/terraform-provider-github@27ecd32
stevehipwell commentedon Oct 23, 2025
I'd like to see us switch over to gofri/go-github-ratelimit to make use of the new
DisableRateLimitCheckglobal flag in the SDK. I also don't think we need to make this optional.kishaningithub commentedon Jan 28, 2026
@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

kishaningithub commentedon Jan 28, 2026
Also what is your opinion on using https://github.com/hashicorp/go-retryablehttp for more fine grained control?
stevehipwell commentedon Jan 28, 2026
@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.
feat: add modern rate limiter option using go-github-ratelimit