semantic-release: HttpError: You have exceeded a secondary rate limit.
Current behavior
I got the error when semantic-release
interacts with GitHub to write success
messages
[6:24:06 AM] [semantic-release] › ✖ Failed step "success" of plugin "@semantic-release/github"
[6:24:06 AM] [semantic-release] › ✖ An error occurred while running semantic-release: RequestError [HttpError]: You have exceeded a secondary rate limit. Please wait a few minutes before you try again.
at /home/runner/work/serverless-esbuild/serverless-esbuild/node_modules/@octokit/request/dist-node/index.js:86:21
at processTicksAndRejections (internal/process/task_queues.js:97:5) {
status: 403,
response: {
url: 'https://api.github.com/search/issues?q=repo%3Afloydspace%2Fserverless-esbuild+type%3Apr+is%3Amerged+8e105a6ff5174d23adb1eb0e42606c63e1224d24',
status: 403,
headers: {
'access-control-allow-origin': '*',
'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, Deprecation, Sunset',
connection: 'close',
'content-encoding': 'gzip',
'content-security-policy': "default-src 'none'",
'content-type': 'application/json; charset=utf-8',
date: 'Mon, 25 Oct 2021 06:24:06 GMT',
'referrer-policy': 'origin-when-cross-origin, strict-origin-when-cross-origin',
server: 'GitHub.com',
'strict-transport-security': 'max-age=31536000; includeSubdomains; preload',
'transfer-encoding': 'chunked',
vary: 'Accept-Encoding, Accept, X-Requested-With',
'x-content-type-options': 'nosniff',
'x-frame-options': 'deny',
'x-github-media-type': 'github.v3; format=json',
'x-github-request-id': '0402:301C:BA78B:7F32F3:61764D85',
'x-ratelimit-limit': '30',
'x-ratelimit-remaining': '29',
'x-ratelimit-reset': '1635143106',
'x-ratelimit-resource': 'search',
'x-ratelimit-used': '1',
'x-xss-protection': '0'
},
data: {
documentation_url: 'https://docs.github.com/en/free-pro-team@latest/rest/overview/resources-in-the-rest-api#secondary-rate-limits',
message: 'You have exceeded a secondary rate limit. Please wait a few minutes before you try again.'
}
},
request: {
method: 'GET',
url: 'https://api.github.com/search/issues?q=repo%3Afloydspace%2Fserverless-esbuild+type%3Apr+is%3Amerged+8e105a6ff5174d23adb1eb0e42606c63e1224d24',
headers: {
accept: 'application/vnd.github.v3+json',
'user-agent': 'octokit-rest.js/18.12.0 octokit-core.js/3.5.1 Node.js/12.22.7 (linux; x64)',
authorization: 'token [REDACTED]'
},
request: { agent: undefined, hook: [Function: bound bound register] }
},
pluginName: '@semantic-release/github'
}
AggregateError:
HttpError: You have exceeded a secondary rate limit. Please wait a few minutes before you try again.
at /home/runner/work/serverless-esbuild/serverless-esbuild/node_modules/@octokit/request/dist-node/index.js:86:21
at /home/runner/work/serverless-esbuild/serverless-esbuild/node_modules/semantic-release/lib/plugins/pipeline.js:54:11
at async Object.pluginsConf.<computed> [as success] (/home/runner/work/serverless-esbuild/serverless-esbuild/node_modules/semantic-release/lib/plugins/index.js:80:11)
at async run (/home/runner/work/serverless-esbuild/serverless-esbuild/node_modules/semantic-release/index.js:201:3)
at async module.exports (/home/runner/work/serverless-esbuild/serverless-esbuild/node_modules/semantic-release/index.js:260:22)
at async module.exports (/home/runner/work/serverless-esbuild/serverless-esbuild/node_modules/semantic-release/cli.js:55:5)
Expected behavior
The pipeline completes without errors, though I have nothing to suggest how to fix it.
Environment
- semantic-release version: 17.4.7
- CI environment: GitHub Actions
- Plugins used: @semantic-release/github
- semantic-release configuration: https://github.com/floydspace/serverless-esbuild/blob/master/.releaserc.yml
- CI logs: https://github.com/floydspace/serverless-esbuild/runs/3993416106?check_suite_focus=true
About this issue
- Original URL
- State: open
- Created 3 years ago
- Reactions: 62
- Comments: 38 (2 by maintainers)
Commits related to this issue
- fix: use retry and throttle octokit plugins Refactors the client to use [@octokit/plugin-retry](https://www.npmjs.com/package/@octokit/plugin-retry) and [@octokit/plugin-throttling](https://www.npmjs... — committed to achingbrain/github by achingbrain 2 years ago
- fix: use @semantic-release/github fork @semantic-release/github doesn't respect GitHub's rate limiting - it did once but I think GH changed their response type and now it doesn't which means publishi... — committed to ipfs/aegir by achingbrain 2 years ago
- fix: use @semantic-release/github fork (#956) @semantic-release/github doesn't respect GitHub's rate limiting - it did once but it looks like GH changed their response type and now it doesn't which... — committed to ipfs/aegir by achingbrain 2 years ago
- fix: trigger release, due to https://github.com/semantic-release/semantic-release/issues/2204 — committed to Shelex/cypress-allure-plugin by deleted user 2 years ago
- fix(semantic-release): Fix Github rate limit Sometimes the builds fail because of hitting a Github rate limit, which seems to be because Github has changed the limit for something that Semantic Relea... — committed to StjerneIdioten/I3D-Blender-Addon by StjerneIdioten a year ago
- ci: update semantic-release and avoid gh rate limit See https://github.com/semantic-release/semantic-release/issues/2204. Used temporarily the successComment and failTitle: false workaround. And use... — committed to mbehr1/fishbone by mbehr1 a year ago
- ci(release): do not comment on issues This triggers the rate limit. See https://github.com/semantic-release/semantic-release/issues/2204 — committed to NordicSemiconductor/cloud-aws-cloudformation-cleaner-js by coderbyheart a year ago
- ci(release): do not comment on issues This triggers the rate limit. See https://github.com/semantic-release/semantic-release/issues/2204 — committed to NordicSemiconductor/cloud-aws-cloudformation-helpers-js by coderbyheart a year ago
- ci(release): do not comment on issues This triggers the rate limit. See https://github.com/semantic-release/semantic-release/issues/2204 — committed to NordicSemiconductor/cloud-aws-timestream-helpers-js by coderbyheart a year ago
- ci(release): do not comment on issues This triggers the rate limit. See https://github.com/semantic-release/semantic-release/issues/2204 — committed to hello-nrfcloud/public-parameter-registry-aws-js by coderbyheart a year ago
- ci(release): do not comment on issues This triggers the rate limit. See https://github.com/semantic-release/semantic-release/issues/2204 — committed to NordicSemiconductor/cloud-bdd-markdown-e2e-example-aws-js by coderbyheart a year ago
- ci(release): do not comment on issues This triggers the rate limit. See https://github.com/semantic-release/semantic-release/issues/2204 — committed to NordicSemiconductor/random-words-js by coderbyheart a year ago
- ci(release): do not comment on issues This triggers the rate limit. See https://github.com/semantic-release/semantic-release/issues/2204 — committed to NordicSemiconductor/cell-geolocation-helpers-js by coderbyheart a year ago
- ci(release): do not comment on issues This triggers the rate limit. See https://github.com/semantic-release/semantic-release/issues/2204 — committed to NordicSemiconductor/asset-tracker-cloud-device-ui-server-js by coderbyheart a year ago
- ci(release): do not comment on issues This triggers the rate limit. See https://github.com/semantic-release/semantic-release/issues/2204 — committed to NordicSemiconductor/asset-tracker-cloud-firmware-aws by coderbyheart a year ago
- ci(release): do not comment on issues This triggers the rate limit. See https://github.com/semantic-release/semantic-release/issues/2204 — committed to NordicSemiconductor/cloud-aws-firmware-ci-device-action by coderbyheart a year ago
- ci(release): do not comment on issues This triggers the rate limit. See https://github.com/semantic-release/semantic-release/issues/2204 — committed to NordicSemiconductor/lwm2m-types-js by coderbyheart a year ago
- ci(release): do not comment on issues This triggers the rate limit. See https://github.com/semantic-release/semantic-release/issues/2204 — committed to NordicSemiconductor/asset-tracker-cloud-firmware-azure by coderbyheart a year ago
- ci(release): do not comment on issues This triggers the rate limit. See https://github.com/semantic-release/semantic-release/issues/2204 — committed to NordicSemiconductor/asset-tracker-cloud-memfault-azure-js by coderbyheart a year ago
- ci(release): do not comment on issues This triggers the rate limit. See https://github.com/semantic-release/semantic-release/issues/2204 — committed to NordicSemiconductor/asset-tracker-cloud-docs by coderbyheart a year ago
I plan on working on https://github.com/semantic-release/github/pull/487 after Feb 1st, that should address semantic-release’s site. I hope that will address most of the secondary rate limit errors. But I do have the feeling that GitHub also changed the way the secondary limit is triggered. We’ll see how it goes. If the problem remains I’ll try to find out
For those of you who still experience this problem. I solved this in the meantime by disabling the features in the
@semantic-release/github
plugin that uses thehttps://api.github.com/search
endpoint, which is the one that causes thesecondary rate limit exceeds
.Configure
@semantic-release/github
as follows:Any update on this? 👀
The issue was reported in version
17.4.7
. I’m using19.0.3
and the issue is still there.@foxhound87 it depends on how you configure it. We use a
.releaserc
with the following content (I can’t share a link to the file because it’s an internal repo 😃 )We’ve had this issue twice within our team this morning in different repos
Both times it received the error
You have exceeded a secondary rate limit. Please wait a few minutes before you try again
when trying to hit the urlhttps://api.github.com/search/issues
Encountering the same problem, I temporarily used a GitHub Action utility called “Retry Step” to automatically retry failed release steps after a few seconds.
News?
Curious if this is on the roadmap. This is impacting our releases since we use semantic release.
I also get this issue at least once a day now, though I have yet to find a clear pattern to what triggers it. I have noticed that waiting 10 minutes between sending a PR and merging it seems to help but it’s not s cure-all. Also, this issue seemed to be non-existent a year ago and has steadily be getting worse over the past few months. It has even been getting worse in the repos where I have stuck to using the same version of semantic release for the whole year. So I assume that this is not just an issue with semantic release but possibly the result of some GitHub policy changes. Needless to say, a fix for this would undoubtedly give me some hours of my life back.
I still have the issue in
semantic-release
version19.0.5
Hmm… me as well. Github? 🦗🦗🦗 Semantic? 🦗🦗🦗
I still have this issue with
semantic-release@20.0.2
&@semantic-release/github@8.0.7
.Just started to get it here too…
😕
https://github.com/containerbase/buildpack/runs/7893136166?check_suite_focus=true
We’re seeing this issue quite often as well. Is there any known work arounds?
I think the throttling is currently broken because GitHub’s response changed its wording a few months ago.
This will be resolved once we resolve https://github.com/semantic-release/github/issues/299. Pull request welcome!
This is a duplicate of #843. I suspect that that issue was not fixed properly. I got this error today too just for a small push.
I am not sure if semantic-release waits 1 s between two calls, or just 720 ms.
You can wait for a couple of minutes and then retry the job. I did it and it helped.