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
[BUG]: github_repository_collaborators much slower than github_team_repository/github_repository_collaborator #2149
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.
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.
Based on looking into this further I think it is being caused by the github_repository_collaborators resource forcing the use of the team slug instead of the the user defined identifier (see #2414) which requires the use of the getTeamSlug function which is making unnecessary calls to the GH API for every team defined even when they've been defined with an ID.
Activity
stevehipwell commentedon Oct 7, 2024
The
github_repository_collaboratorsresource is effectively unusable at any scale due to the excessive API calls that it makes.stevehipwell commentedon Oct 11, 2024
Based on looking into this further I think it is being caused by the
github_repository_collaboratorsresource forcing the use of the team slug instead of the the user defined identifier (see #2414) which requires the use of thegetTeamSlugfunction which is making unnecessary calls to the GH API for every team defined even when they've been defined with an ID.