Closed
Description
Expected Behavior
When the provider fails to find the file being looked for in the data block, if it does not exist in the first page, it should proceed to the second page.
Actual Behavior
Provider reported the file as not found.
Terraform Version
Terraform v1.6.0
on linux_amd64
integrations/github v5.41.0
Affected Resource(s)
- data.github_repository_file
Terraform Configuration Files
data "github_repository_file" "lookup_files" {
repository = "<some repo>"
branch = "<some branch>"
file = "<some file>"
}
provider "github" {
token = "<some token>"
owner = "<some owner>"
}
Steps to Reproduce
- Create a commit with 300+ changes.
- use data.github_repository_file to lookup a file that shows up on the 2nd page when you query the api.
Debug Output
Obviously wont post the full unredacted log but here's some snippets.
======Request for the commit======
2023-11-06T14:02:08.246-0600 [DEBUG] provider.terraform-provider-github_v5.41.0: -----------------------------------------------------
2023-11-06T14:02:08.246-0600 [DEBUG] provider.terraform-provider-github_v5.41.0: 2023/11/06 14:02:08 [DEBUG] GitHub API Request Details:
2023-11-06T14:02:08.246-0600 [DEBUG] provider.terraform-provider-github_v5.41.0: ---[ REQUEST ]---------------------------------------
2023-11-06T14:02:08.246-0600 [DEBUG] provider.terraform-provider-github_v5.41.0: GET /repos/redacted/redacted/commits/redacted HTTP/1.1
2023-11-06T14:02:08.246-0600 [DEBUG] provider.terraform-provider-github_v5.41.0: Host: api.github.com
2023-11-06T14:02:08.246-0600 [DEBUG] provider.terraform-provider-github_v5.41.0: User-Agent: go-github/v55.0.0
2023-11-06T14:02:08.246-0600 [DEBUG] provider.terraform-provider-github_v5.41.0: Accept: application/vnd.github.v3+json,application/vnd.github.stone-crop-preview+json
2023-11-06T14:02:08.246-0600 [DEBUG] provider.terraform-provider-github_v5.41.0: X-Github-Api-Version: 2022-11-28
2023-11-06T14:02:08.246-0600 [DEBUG] provider.terraform-provider-github_v5.41.0: Accept-Encoding: gzip
=======Failed to find SHA======
2023-11-06T14:02:08.603-0600 [DEBUG] provider.terraform-provider-github_v5.41.0: 2023/11/06 14:02:08 [DEBUG] Found file: <redacted>/<redacted>/path/to/<redacted>, in commit SHA: <blank>
Panic Output
No panic, just returns with error.
Code of Conduct
- I agree to follow this project's Code of Conduct