integrations / terraform-provider-github

Terraform GitHub provider
https://www.terraform.io/docs/providers/github/
MIT License
891 stars 736 forks source link

[feat]: `github_repository_collaborator` lacks etag support/hits quota limits #2059

Open nairb774 opened 9 months ago

nairb774 commented 9 months ago

Expected Behavior

Terraform plans using github_repository_collaborator resources should make use of etags avoid rate limits when there is no drift.

Actual Behavior

Rate limits are hit during plans with no drift.

Error: GET https://api.github.com/repos/XXX/XXX/collaborators?per_page=100: 403 API rate limit of 15000 still exceeded until 2023-12-11 19:43:59 +0000 UTC, not making remote request. [rate reset in 29m44s]

Terraform Version

Terraform v1.5.4 on linux_amd64

Affected Resource(s)

Terraform Configuration Files

resource "github_repository_collaborator" "repo_srv_tool" {
  repository = github_repository.repo.name
  username   = data.github_user.srv_tool.login
  permission = "Manager"
}


### Steps to Reproduce

Have a sufficient number of `github_repository_collaborator` resources (and others) combined with a sufficient number of plans such that the overall rate limits are triggered. The workspace that is hitting this has just shy of 4,000 github resources so one or two resources missing etags eats through quota quick.

### Debug Output

_No response_

### Panic Output

_No response_

### Code of Conduct

- [X] I agree to follow this project's Code of Conduct
nickfloyd commented 9 months ago

Modified to feature work given it's missing/needed/wanted functionality.

github-actions[bot] commented 3 days ago

👋 Hey Friends, this issue has been automatically marked as stale because it has no recent activity. It will be closed if no further activity occurs. Please add the Status: Pinned label if you feel that this issue needs to remain open/active. Thank you for your contributions and help in keeping things tidy!