fastly / compute-actions

GitHub Actions for building on Fastly Compute.
https://www.fastly.com/blog/introducing-github-actions-for-compute-edge-a-new-resource-to-help-ship-code
MIT License
40 stars 9 forks source link

Rate limited running `fastly/compute-actions/setup@v2` #20

Closed ccouzens closed 1 year ago

ccouzens commented 2 years ago

We had a failed deploy caused by a rate limiting error:

Error: Unable to fetch the requested release (latest): API rate limit exceeded for 20.39.47.73. (But here's the good news: Authenticated requests get a higher rate limit. Check out the documentation for more details.)

I presume Github Actions runner was rate limited downloading the fastly package from Github.

image

The IP Address is Microsoft's and presumably the IP of the Github runner.

JakeChampion commented 2 years ago

@ccouzens That usually means the action was not supplied a GitHub token to use for the API requests.

Could you try this and see if it works for you?

 - name: Set up Fastly CLI
      uses: fastly/compute-actions/setup@v2
      with:
        token: ${{ secrets.GITHUB_TOKEN }}
JakeChampion commented 1 year ago

@ccouzens did using a GitHub token resolve the issue for you?

ccouzens commented 1 year ago

Hi, we have always had a github token setup in this workflow.

We haven't seen the issue again, so I'm dismissing it as a blip and closing the issue.

Thank you for your time.

platy commented 1 year ago

@JakeChampion Did you mean to suggest adding a fastly token here rather than a github token here. This looks like a rate limit from fastly rather than a rate limit from github

    - uses: fastly/compute-actions/deploy@v2
      env:
        FASTLY_API_TOKEN: ${{ secrets.FASTLY_API_TOKEN }}
JakeChampion commented 1 year ago

I did not, this is a GitHub rate limit and is solved by providing the token from the running action like so:

 - name: Set up Fastly CLI
      uses: fastly/compute-actions/setup@v2
      with:
        token: ${{ secrets.GITHUB_TOKEN }}
platy commented 1 year ago

Sorry for my confusion. Thanks!