Skip to content

[BUG]: Provider stalls for hours on unauthenticated refresh instead of failing fast #3562

Description

@guineveresaenger

Expected Behavior

When the provider has no token and is talking to api.github.com, an operation that can't
succeed anonymously should fail fast with a clear "authentication required" error.

Actual Behavior

With an empty token the provider silently enters anonymous mode and proceeds. On a plan/refresh
over an org with many repositories it can stall for hours before failing.

I believe this is due to the anonymous primary rate limit (60 requests/hour/IP) combined with
RateLimitTransport's sleep-until-reset behavior

rlErr := &github.RateLimitError{}
if errors.As(ghErr, &rlErr) {
rlt.nextRequestDelay = 0
retryAfter := time.Until(rlErr.Rate.Reset.Time)
log.Printf("[WARN] Rate limit %d reached, sleeping for %s (until %s) before retrying",
rlErr.Rate.Limit, retryAfter, time.Now().Add(retryAfter))
sleep(req.Context(), retryAfter)
:

Reported by a user of the downstream Pulumi provider in pulumi/pulumi-github#1242.

Terraform Version

Provider v6.14.0

GitHub Installation Type

  • GitHub.com (Free, Pro, or Team)
  • GitHub Enterprise Server (on-premises)
  • GitHub Enterprise Cloud with Personal Accounts (github.com)
  • GitHub Enterprise Cloud with Managed Users/EMU (github.com)
  • GitHub Enterprise Cloud with Data Residency (*.ghe.com)
  • I don't know

Affected Resource(s)

  • github_repository
  • github_repository_vulnerability_alerts
  • Any anonymous read that trips the 60/hour anonymous rate limit

Terraform Configuration Files

provider "github" {}  # no token in the environment

resource "github_repository" "example" {
  name = "example"
}

Steps to Reproduce

  1. Manage several github_repository resources.
  2. Run terraform plan with no GITHUB_TOKEN/token set.
  3. Observe the run sleep for ~1 hour at a time and take hours to fail, rather than erroring
    immediately on the unauthenticated response.

Debug Output

Code of Conduct

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

Activity

  1. added
    Type: Bug
    Status: Triage
    on Jul 20, 2026
  2. github-actions commented on Jul 20, 2026

    @github-actions

    👋 Hi, and thank you for opening this issue!

    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 adding details, reproduction steps, or a 👍 to issues that matter to you, and by joining the discussion on open issues and PRs.


    🤖 This is an automated message.

  3. deiga commented on Jul 20, 2026

    @deiga
    Collaborator

    @guineveresaenger There is no version 6.14.0 of this provider yet.

    Please provide a DEBUG level log output of the problematic command.

  4. deiga commented on Jul 22, 2026

    @deiga
    Collaborator

    I think this is either a bug/feature in Pulimi or the Pulumi-wrapper.
    If it isn't, this will be resolved by #3310

  5. removed
    Status: Triage
    on Nov 23, 2026
  6. added this to the v6.14.0 milestone on Nov 23, 2026
  7. stevehipwell commented on Nov 23, 2026

    @stevehipwell
    Collaborator

    This bug shouldn't be present in the current release if you're using the new provider (legacy = false). PR #3739 will fix a couple of issues with the new client so please switch over to that after the next release.

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

    Type: Bug

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions