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

Volta update check through Github is not using GITHUB_COM_TOKEN env #11506

Closed
pataar opened this issue Aug 31, 2021 · 1 comment
Closed

Volta update check through Github is not using GITHUB_COM_TOKEN env #11506

pataar opened this issue Aug 31, 2021 · 1 comment
Labels
status:requirements Full requirements are not yet known, so implementation should not be started type:bug Bug fix of existing functionality

Comments

@pataar
Copy link
Contributor

pataar commented Aug 31, 2021

How are you running Renovate?

Self-hosted

Please select which platform you are using if self-hosting.

GitLab self-hosted

If you're self-hosting Renovate, tell us what version of Renovate you run.

26.14.0

Describe the bug

It seems that renovate is checking for updates of Nodejs without using the GITHUB_COM_TOKEN. If you have more than 60 projects, the rate limit is hit pretty fast. This might be related to #11496.
The logs clearly show "x-ratelimit-limit":"60" while that should be higher with a token.

I can verify that a token has been set though (stated in the logs):

{"hostRules":[{"hostType":"github","matchHost":"github.com","token":"***********"},

Relevant debug logs

Logs
{"name":"renovate","hostname":"runner-7cce4yqy-project-620-concurrent-0","pid":12,"level":20,"logContext":"FaeunVsl7","repository":"-redacted-","msg":"Setting npmrc","time":"2021-08-31T19:34:31.072Z","v":0}
{"name":"renovate","hostname":"runner-7cce4yqy-project-620-concurrent-0","pid":12,"level":20,"logContext":"FaeunVsl7","repository":"-redacted-","err":{"name":"HTTPError","timings":{"start":1630438471199,"socket":1630438471199,"lookup":1630438471216,"connect":1630438471227,"secureConnect":1630438471240,"upload":1630438471240,"response":1630438471250,"end":1630438471250,"phases":{"wait":0,"dns":17,"tcp":11,"tls":13,"request":0,"firstByte":10,"download":0,"total":51}},"message":"Response code 403 (rate limit exceeded)","stack":"HTTPError: Response code 403 (rate limit exceeded)\n    at Request.<anonymous> (/usr/src/app/node_modules/got/dist/source/as-promise/index.js:117:42)\n    at processTicksAndRejections (internal/process/task_queues.js:95:5)","options":{"headers":{"user-agent":"RenovateBot/26.14.0 (https://github.com/renovatebot/renovate)","accept":"application/vnd.github.v3+json","accept-encoding":"gzip, deflate, br"},"url":"https://api.github.com/repos/nodejs/node/tags?per_page=100","username":"","password":"","method":"GET","http2":false},"response":{"statusCode":403,"statusMessage":"rate limit exceeded","body":{"message":"API rate limit exceeded for 51.144.67.65. (But here's the good news: Authenticated requests get a higher rate limit. Check out the documentation for more details.)","documentation_url":"https://docs.github.com/rest/overview/resources-in-the-rest-api#rate-limiting"},"headers":{"date":"Tue, 31 Aug 2021 19:34:31 GMT","server":"Varnish","strict-transport-security":"max-age=31536000; includeSubdomains; preload","x-content-type-options":"nosniff","x-frame-options":"deny","x-xss-protection":"1; mode=block","content-security-policy":"default-src 'none'; style-src 'unsafe-inline'","access-control-allow-origin":"*","access-control-expose-headers":"ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-RateLimit-Used, X-RateLimit-Resource, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, Deprecation, Sunset","content-type":"application/json; charset=utf-8","referrer-policy":"origin-when-cross-origin, strict-origin-when-cross-origin","x-github-media-type":"github.v3; format=json","x-ratelimit-limit":"60","x-ratelimit-remaining":"0","x-ratelimit-reset":"1630441403","x-ratelimit-resource":"core","x-ratelimit-used":"60","content-length":"278","x-github-request-id":"E9A8:FA92:AC2F7:B638C:612E8447","connection":"close"},"httpVersion":"1.1"}},"msg":"GitHub failure: rate limit","time":"2021-08-31T19:34:31.251Z","v":0}
{"name":"renovate","hostname":"runner-7cce4yqy-project-620-concurrent-0","pid":12,"level":20,"logContext":"FaeunVsl7","repository":"-redacted-","datasource":"github-tags","lookupName":"nodejs/node","err":{"message":"rate-limit-exceeded","stack":"Error: rate-limit-exceeded\n    at handleGotError (/usr/src/app/node_modules/renovate/lib/util/http/github.ts:81:11)\n    at GithubHttp.request (/usr/src/app/node_modules/renovate/lib/util/http/github.ts:239:7)\n    at processTicksAndRejections (internal/process/task_queues.js:95:5)\n    at GithubHttp.requestJson (/usr/src/app/node_modules/renovate/lib/util/http/index.ts:228:17)\n    at getTags (/usr/src/app/node_modules/renovate/lib/datasource/github-tags/index.ts:156:5)\n    at Object.getReleases (/usr/src/app/node_modules/renovate/lib/datasource/github-tags/index.ts:181:22)\n    at getRegistryReleases (/usr/src/app/node_modules/renovate/lib/datasource/index.ts:70:15)\n    at fetchReleases (/usr/src/app/node_modules/renovate/lib/datasource/index.ts:227:15)\n    at Object.getPkgReleases (/usr/src/app/node_modules/renovate/lib/datasource/index.ts:285:7)\n    at Object.lookupUpdates (/usr/src/app/node_modules/renovate/lib/workers/repository/process/lookup/index.ts:68:30)\n    at fetchDepUpdates (/usr/src/app/node_modules/renovate/lib/workers/repository/process/fetch.ts:38:13)\n    at /usr/src/app/node_modules/p-map/index.js:57:22"},"msg":"Datasource unknown error","time":"2021-08-31T19:34:31.251Z","v":0}
{"name":"renovate","hostname":"runner-7cce4yqy-project-620-concurrent-0","pid":12,"level":20,"logContext":"FaeunVsl7","repository":"-redacted-","dependency":"node","packageFile":"package.json","msg":"Failed to look up dependency node","time":"2021-08-31T19:34:31.251Z","v":0}
{"name":"renovate","hostname":"runner-7cce4yqy-project-620-concurrent-0","pid":12,"level":20,"logContext":"FaeunVsl7","repository":"-redacted-","baseBranch":"master","msg":"Package releases lookups complete","time":"2021-08-31T19:34:31.293Z","v":0}

Have you created a minimal reproduction repository?

No reproduction repository

@pataar pataar added priority-5-triage status:requirements Full requirements are not yet known, so implementation should not be started type:bug Bug fix of existing functionality labels Aug 31, 2021
@pataar pataar changed the title Volta update check through Github is not using GITHUB_COM_TOKEN env var Volta update check through Github is not using GITHUB_COM_TOKEN env Aug 31, 2021
@pataar
Copy link
Contributor Author

pataar commented Sep 3, 2021

Setting the token in hostRules in the config instead of the env variable fixed this for me.

@pataar pataar closed this as completed Sep 3, 2021
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 4, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
status:requirements Full requirements are not yet known, so implementation should not be started type:bug Bug fix of existing functionality
Projects
None yet
Development

No branches or pull requests

1 participant