Skip to content
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

Tools updater throws 402 rate limit exceeded error #48119

Closed
anonrig opened this issue May 22, 2023 · 3 comments · Fixed by #48200
Closed

Tools updater throws 402 rate limit exceeded error #48119

anonrig opened this issue May 22, 2023 · 3 comments · Fixed by #48200
Labels
tools Issues and PRs related to the tools directory.

Comments

@anonrig
Copy link
Member

anonrig commented May 22, 2023

Referencing: https://github.com/nodejs/node/actions/runs/5049673263/jobs/9059426826

Run ./tools/dep_updaters/update-simdutf.sh > temp-output
file:///home/runner/work/node/node/[eval1]:2
if (!res.ok) throw new Error(`FetchError: ${res.status} ${res.statusText}`, { cause: res });
                   ^

Error: FetchError: 403 rate limit exceeded
@marco-ippolito
Copy link
Member

I think its because the rate limit for unauthenticated github api calls is very low

@marco-ippolito marco-ippolito added the tools Issues and PRs related to the tools directory. label May 25, 2023
@fasenderos
Copy link
Contributor

fasenderos commented May 27, 2023

I think its because the rate limit for unauthenticated github api calls is very low

Exactly, the rate limit is 60 calls per hour for unauthenticated requests

$ curl -i https://github.com/gitapi/nodejs/node

HTTP/2 404 
server: GitHub.com
date: Sat, 27 May 2023 07:54:56 GMT
content-type: application/json; charset=utf-8
x-github-media-type: github.v3; format=json
x-github-api-version-selected: 2022-11-28
access-control-expose-headers: ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset
access-control-allow-origin: *
strict-transport-security: max-age=31536000; includeSubdomains; preload
x-frame-options: deny
x-content-type-options: nosniff
x-xss-protection: 0
referrer-policy: origin-when-cross-origin, strict-origin-when-cross-origin
content-security-policy: default-src 'none'
vary: Accept-Encoding, Accept, X-Requested-With
x-ratelimit-limit: 60
x-ratelimit-remaining: 51
x-ratelimit-reset: 1685176534
x-ratelimit-resource: core
x-ratelimit-used: 9
content-length: 84
x-github-request-id: 3CAE:898A:13DC9C53:140DBB7B:6471B74F

The Job failed with the following error. To solve that problem we can authenticate the request to increase the rate limit to 1000 calls per hour, or read the reset value from the response header to schedule a new job

'x-ratelimit-limit' => { name: 'X-RateLimit-Limit', value: '60' },
'x-ratelimit-remaining' => { name: 'X-RateLimit-Remaining', value: '0' },
'x-ratelimit-reset' => { name: 'X-RateLimit-Reset', value: '1684786333' },
'x-ratelimit-resource' => { name: 'X-RateLimit-Resource', value: 'core' },
'x-ratelimit-used' => { name: 'X-RateLimit-Used', value: '60' },
'content-length' => { name: 'Content-Length', value: '279' },

@marco-ippolito
Copy link
Member

I guess we can authenticate the request

nodejs-github-bot pushed a commit that referenced this issue May 29, 2023
PR-URL: #48200
Fixes: #48119
Refs: nodejs/security-wg#973
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Mestery <mestery@protonmail.com>
targos pushed a commit that referenced this issue May 30, 2023
PR-URL: #48200
Fixes: #48119
Refs: nodejs/security-wg#973
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Mestery <mestery@protonmail.com>
Ceres6 pushed a commit to Ceres6/node that referenced this issue Aug 14, 2023
PR-URL: nodejs#48200
Fixes: nodejs#48119
Refs: nodejs/security-wg#973
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Mestery <mestery@protonmail.com>
Ceres6 pushed a commit to Ceres6/node that referenced this issue Aug 14, 2023
PR-URL: nodejs#48200
Fixes: nodejs#48119
Refs: nodejs/security-wg#973
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Mestery <mestery@protonmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tools Issues and PRs related to the tools directory.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants
@fasenderos @anonrig @marco-ippolito and others