-
Notifications
You must be signed in to change notification settings - Fork 3.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
API rate limit exceeded for Mac OS hosted by GitHub itself #602
Comments
Hello, GitHub complains about rate limit regardless of the source of request because GA workflow can be used to spam API too. |
I'd like to emphasize that windows and ubuntu runners do not get caught by rate limiting (probably because there are many more of these machines). Isn't it possible for all the runners to use the credentials of the user that pushed commits or created the job? Do you have a link that helps setup explicit authentication in workflows, so this can be used as a workaround? |
@evandrocoan, @fenollp: I'm following up with the infrastructure team to figure out solutions to this. I'll update as soon as I get some answers. |
This seems to be the best to solution to avoid the spammers problem. I tried adding this: (from here https://help.github.com/en/actions/configuring-and-managing-workflows/authenticating-with-the-github_token) - name: Set up protoc
uses: Arduino/actions/setup-protoc@master
with:
repo-token: ${{ secrets.GITHUB_TOKEN }} But the build still failing: https://github.com/evandroforks/anki/runs/528131718?check_suite_focus=true#step:4:8 I also, notice a Linux Build failing right now: https://github.com/evandroforks/anki/runs/528131695?check_suite_focus=true#step:4:7 |
@evandrocoan Just a quick not that it doesn't look like the |
Thanks for point it out. And as a side note, looks like this think of API rate limit is going to be a more common problem when GitHub Actions get more used. On that case, our Actions Workflow files would have to look like this for every action: name: Windows Tests
on: [push, pull_request]
jobs:
test:
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: Cache pacman
uses: actions/cache@v1
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
path: C:\Program Files\Git
key: ${{ runner.os }}-pacman-${{ hashFiles('**/windows_checks.yml') }}
- name: Set up python
uses: actions/setup-python@v1
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
python-version: 3.7
- name: Set up protoc
uses: Arduino/actions/setup-protoc@master
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: Set up node
uses: actions/setup-node@v1
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
node-version: 12
- name: Upload python wheels
uses: actions/upload-artifact@v1
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
name: windows_python_wheels
path: dist If you pay attention, every third part action would require to have an So, for a consistent |
In my case the 403s I get from github are from plain curls to github.com. See these logs on macOS. I agree that this issue is bound to come up more often as GAs usage grows. Let's see what infra people have to say :) |
@evandrocoan , Actually, All these actions (except Arduino) doesn't use GitHub API so they are not affected by rate limit issue. The As for your case, I think I have found the root cause of your issue: Just checked in my repo and |
Thanks @maxim-lobanov! It is working 100% now! https://github.com/evandroforks/anki/runs/531198664?check_suite_focus=true (the build is just failing due Mac OS related issues I am solving right now). |
Is it safe to expose On this other topic I found this: https://github.community/t5/GitHub-Actions/Github-Actions-Token-Scope/td-p/39811
So, this means that GitHub Actions which have access to the @dae have forked the repository arduino/setup-protoc because neither he or me know enough about GitHub's actions architecture, to know whether it's safe to be exposing the GitHub token to third party actions (on this case Should he keep the fork he did or it is safe to pass the |
@evandrocoan , Also, good practice is pointing to particular version of Action like Also, as a possible solution, you can generate own PAT manually, put it to the secrets and use instead of System GITHUB_TOKEN. In this case, you will be able to configure scope of your PAT and restrict it fully (to overcome API Rate limit, you can disable absolutely all permissions for token). |
@evandrocoan , I am planning to close the issue. Please let me know if you have any other questions or have any concerns |
To overcome this issue [for Python] I wrote—and contributed to public domain—this: https://pypi.org/project/ghapi-conversion
PS: It is easy enough to add support for |
Fixed a bug in GitHub Actions designed to catch spammers on the MacOS. Following: actions/runner-images#602.
MacOS jobs are always failing due to a GitHub limitation when downloading the GeckoDriver from GitHub for `Protractor`. More details can be found on actions/runner-images#602
## Issue Addressed The release CI is currently broken due to the addition of the `protoc` dependency. Here's a failure of the release flow running on my fork: https://github.com/michaelsproul/lighthouse/actions/runs/3155541478/jobs/5134317334 ## Proposed Changes - Install `protoc` on Windows and Mac so that it's available for `cargo install`. - Install an x86_64 binary in the Cross image for the aarch64 platform: we need a binary that runs on the host, _not_ on the target. - Fix `macos` local testnet CI by using the Github API key to dodge rate limiting (this issue: actions/runner-images#602).
## Issue Addressed The release CI is currently broken due to the addition of the `protoc` dependency. Here's a failure of the release flow running on my fork: https://github.com/michaelsproul/lighthouse/actions/runs/3155541478/jobs/5134317334 ## Proposed Changes - Install `protoc` on Windows and Mac so that it's available for `cargo install`. - Install an x86_64 binary in the Cross image for the aarch64 platform: we need a binary that runs on the host, _not_ on the target. - Fix `macos` local testnet CI by using the Github API key to dodge rate limiting (this issue: actions/runner-images#602).
Describe the bug
I have setup GitHub Actions for Windows, Linux and Mac OS. Both of them use the https://github.com/arduino/actions, and are working fine, except for the Mac OS machine, which keeps complaining: https://github.com/evandroforks/anki/runs/526371357?check_suite_focus=true
Area for Triage:
Question, Bug, or Feature?:
"Bug"
Virtual environments affected
Expected behavior
GitHub Actions hosted by GitHub itself, should not be complaning about API rate limits, as it is GitHub own server/machine which is originating the GitHub Request for another GitHub Service (GitHub Actions).
Actual behavior
API rate limit exceeded.
https://github.com/evandroforks/anki/runs/526371357?check_suite_focus=true
The text was updated successfully, but these errors were encountered: