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

Hitting rate limits #38

Closed domdomegg closed 1 year ago

domdomegg commented 1 year ago

When using this action in GitHub Actions we're hitting the issue:

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

I think this is trying to hit some GitHub API in the tool cache. Maybe we should be passing through the GitHub token? Or there's some other step we should be taking?

/home/runner/work/_actions/fastly/compute-actions/v5/setup/index.js:60
    let existingVersion = tc.find('fastly', release.data.name);
                                                    ^

TypeError: Cannot read properties of undefined (reading 'data')
    at downloadCLI (/home/runner/work/_actions/fastly/compute-actions/v5/setup/index.js:60:53)
    at processTicksAndRejections (node:internal/process/task_queues:[9](https://github.com/miraan/ht/actions/runs/4598602319/jobs/8123057919#step:4:10)6:5)
    at async setup (/home/runner/work/_actions/fastly/compute-actions/v5/setup/index.js:[14](https://github.com/miraan/ht/actions/runs/4598602319/jobs/8123057919#step:4:15):5)
JakeChampion commented 1 year ago

@domdomegg for the Fastly CLI setup part of your workflow, are you passing in a github token? Something like this:

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

Ah my bad. After passing in the token we haven't seem to hit the rate limit error again so putting this one down as user error.