-
Notifications
You must be signed in to change notification settings - Fork 30k
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
Hitting rate limits with Travis commit message linting #24567
Comments
Another occurrence: #21408 (comment) |
A workaround might be to set up a very limited proxy that does it for us and only allow the Travis IP addresses to access it. Maybe an extension of the github-bot functionality since it has its own server. |
Solution used by MozillaSecurity/orion is to not use the API but to scrape the GitHub website instead. 😱 We could do the same, replacing URLs like https://api.github.com/repos/nodejs/node/pulls/24366/commits with https://github.com/nodejs/node/pull/24366/commits and scraping for the info. |
If we're careful about what we display in our Travis output, I suppose we might be able to use encrypted variables in Travis to provide Travis with authentication information so we can enable authenticated access to the API to increase our limits. |
/ping @codebytere in case there's some easy way to solve this by asking GitHub. 😄 |
@Trott but encrypted variables are not available to pull requests from other forks. |
And, of course, we can always decide to give up and remove the automatic linting for commit message format. Maybe leave the script in tools and mention it CONTRIBUTING.md or whatever. |
ESLint has a commit-message status check on PRs. Looks like they created it themselves. /ping @not-an-aardvark |
ESLint GitHub bot: https://github.com/eslint/eslint-github-bot I guess if we switch to a bot rather than Travis for this, authenticated access to the API is not-a-problem. |
Saw this now as well : https://travis-ci.com/nodejs/node/jobs/160333929, from #24569. |
@richardlau since the other jobs in the Travis matrix take a long time anyway maybe we can sleep and retry a few times? |
Also we could run this script in Jenkins. |
The rate limit is per hour so I'm not sure how practical that would be. The API includes information about the rate, including when it resets, in the response headers (not currently logged in the job/script). |
Well it was an idea 🤷♂️ |
simple fix proposed in #24574 |
Fixes: nodejs#24567 PR-URL: nodejs#24574 Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com> Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Fixed in 76faccc |
Fixes: nodejs#24567 PR-URL: nodejs#24574 Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com> Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Opening this as a separate issue for tracking/discussion:
FTR: Here's one example where the rate limit is hit:
https://travis-ci.com/nodejs/node/jobs/158565896#L447
I suggest we keep an eye out for if this becomes a more common occurrence. Note that the rate limit for unauthenticated GitHub API requests is IP based so it's whatever Travis is running on that IP (so may not be entirely our jobs).
Authenticated GitHub API requests on Travis may be tricky to implement without exposing the token publicly.
Encrypted environment variables
arenot available to pull requests from forks
.Originally posted by @richardlau in #24254 (comment)
The text was updated successfully, but these errors were encountered: