Skip to content

[BUG]: github_repository_collaborators much slower than github_team_repository/github_repository_collaborator #2149

@pascal-hofmann

Description

@pascal-hofmann

Expected Behavior

We recently switched from using github_team_repository and github_repository_collaborator to github_repository_collaborators, because we wanted to have authoritative management of collaborators. We also expected that this would bring us some performance improvements, because we could reduce the number of resources by a lot.

Actual Behavior

  • We had 2910 github_team_repository resources and 56 github_repository_collaborator resources.
  • After the switch the same things are managed by 637 github_repository_collaborators resources (one per repo).

Even though we have 2329 resources less, the terraform run now takes much longer than before (total run time is up from 6 minutes to 15 minutes.)

We also run into rate limiting issues sporadically, which was not the case before.

Terraform Version

Terraform v1.5.7
on darwin_amd64

  • provider registry.terraform.io/hashicorp/aws v5.21.0
  • provider registry.terraform.io/hashicorp/http v3.4.0
  • provider registry.terraform.io/hashicorp/vault v3.21.0
  • provider registry.terraform.io/integrations/github v5.40.0

Running against GHES 3.9.9 with parallel_requests = true.

Affected Resource(s)

  • github_repository_collaborators

Terraform Configuration Files

The resources are part of a bigger terraform project (used to managed our whole github organization) and we create the resources based on content fetched via HTTP plus some yaml configs, so it's too big to paste here.

Steps to Reproduce

No response

Debug Output

No response

Panic Output

No response

Code of Conduct

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Status: Up for grabsIssues that are ready to be worked on by anyoneType: BugSomething isn't working as documented

    Type

    No type

    Projects

    Status

    ✅ Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions