reviewdog / action-tflint

Run tflint with reviewdog on pull requests to enforce best practices
MIT License
107 stars 22 forks source link

403 API rate limit exceeded #63

Closed Sebelino closed 1 year ago

Sebelino commented 1 year ago

This action is frequently failing due to rate limiting when the tflint executable makes calls to Github's API:

Installing `terraform` plugin...
  Failed to install a plugin; Failed to fetch GitHub releases: GET https://api.github.com/repos/terraform-linters/tflint-ruleset-terraform/releases/tags/v0.2.1: 403 API rate limit exceeded for 40.77.123.115. (But here's the good news: Authenticated requests get a higher rate limit. Check out the documentation for more details.) [rate reset in 35m11s]

Upstream issue: https://github.com/terraform-linters/tflint/issues/1142

I did some debugging and found that this happens during tflint --init: https://github.com/reviewdog/action-tflint/blob/9a32252000423e319fbc53625934345bb6c41921/script.sh#L76

A common solution to this problem is to pass GITHUB_TOKEN to tflint when executing it, but that is not happening currently.

Sebelino commented 1 year ago

Note: This issue is different from https://github.com/reviewdog/action-tflint/issues/61, which I think is about rate limiting when downloading tflint itself.