Skip to content

[BUG]: github_organization_team_sync_groups causing unhandled 429 (Too Many Attempts) errors #2557

@fatbasstard

Description

@fatbasstard

Expected Behavior

Running TF code using the github_organization_team_sync_groups resource to apply mapping works normally when running in multiple workspaces at the same time

Actual Behavior

When running multiple TF runs sumulatiously (20+) causes the github_organization_team_sync_groups to fail with 429 status codes on the API:

Error: GET https://api.github.com/orgs/connectedbrewery/team-sync/groups?page=xxx&per_page=100: 429 []
with module.xxx.data.github_organization_team_sync_groups.okta_groups
on ../../modules/xxx/github.tf line 1, in data "github_organization_team_sync_groups" "okta_groups":
data "github_organization_team_sync_groups" "okta_groups" {}

We're been scaling out our HCP concurrent runners to 50, but when trigger a set of workspaces that use this data source, after the 25th or so workspace the rest fails with this error.

All other Providers handle this well, even the Github providers works decent but this is the only datasource that consistently fails with this error.

Since a 429 is not retried by default I've tries to work around it with the following provider configuration:

  max_retries      = 3
  retry_delay_ms   = 10000
  retryable_errors = [429, 500, 502, 503, 504]

But since solving a "Too many attempts" with more attempts is of course not a really good idea.... As expected this doesn't resolve the issue.

Is there something that can be implemented in the provider to solve/improve this?

Since getting ALL groups for a simple mapping is already a bit overkill, maybe related feature request can help with this: #1809

Terraform Version

Terraform 1.10.5
HCP
integrations/github: 6.5.0

Affected Resource(s)

  • github_organization_team_sync_groups

Terraform Configuration Files

Steps to Reproduce

No response

Debug Output

Panic Output

Code of Conduct

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Status: TriageThis is being looked at and prioritizedType: BugSomething isn't working as documented

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions