googleapis / googleapis/release-please
Customizable delay or retry with backoff for PR creation
- Dominant language
- TypeScript
- Stars
- 7.5k
- Forks
- 588
- Avg merge
- 12h 16m
- Merged PRs (30d)
- 7
Description
We have a large monorepo, and when we need to release a large number (more than approx 10) of packages, release-please will eventually error out with a secondary rate limit violation. This appears to happen in the loop that creates pull requests (we have ours set up to open a separate PR per package), and github seems to have gotten more strict about it recently. It's now happening even though we're setting `sequential-calls` to true.
(Note also: this is running in a github action, and we are using the yoshi code bot account, so when we run into this, we may also affect other teams using that account.)
Would it be okay to configure a delay between pull request creation calls, and/or include a limited retry with backoff, to try to avoid this secondary rate limit?
Sample error below.
```
HttpError: You have exceeded a secondary rate limit and have been temporarily blocked from content creation. Please retry your request again later.
at /home/runner/.npm/_npx/1ec89d33e57ccc0f/node_modules/@octokit/request/dist-node/index.js:86:21
... 8 lines matching cause stack trace ...
at async Manifest.createPullRequests (/home/runner/.npm/_npx/1ec89d33e57ccc0f/node_modules/release-please/build/src/manifest.js:427:43) {
status: 403,
body: {
message: 'You have exceeded a secondary rate limit and have been temporarily blocked from content creation. Please retry your request again later.',
documentation_url: 'https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits'
},
name: 'GitHubAPIError',
cause: RequestError [HttpError]: You have exceeded a secondary rate limit and have been temporarily blocked from content creation. Please retry your request again later.
at /home/runner/.npm/_npx/1ec89d33e57ccc0f/node_modules/@octokit/request/dist-node/index.js:86:21
at runMicrotasks ()
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at async openPullRequest (/home/runner/.npm/_npx/1ec89d33e57ccc0f/node_modules/code-suggester/build/src/github/open-pull-request.js:42:31)
at async createPullRequest (/home/runner/.npm/_npx/1ec89d33e57ccc0f/node_modules/code-suggester/build/src/index.js:142:22)
at async /home/runner/.npm/_npx/1ec89d33e57ccc0f/node_modules/release-please/build/src/github.js:131:30
at async GitHub.createPullRequest (/home/runner/.npm/_npx/1ec89d33e57ccc0f/node_modules/release-please/build/src/github.js:985:20)
at async GitHub.createReleasePullRequest (/home/runner/.npm/_npx/1ec89d33e57ccc0f/node_modules/release-please/build/src/github.js:876:16)
at async Manifest.createOrUpdatePullRequest (/home/runner/.npm/_npx/1ec89d33e57ccc0f/node_modules/release-please/build/src/manifest.js:483:32)
at async Manifest.createPullRequests (/home/runner/.npm/_npx/1ec89d33e57ccc0f/node_modules/release-please/build/src/manifest.js:427:43) {
status: 403,
response: {
url: 'https://api.github.com/repos/googleapis/google-cloud-ruby/pulls',
status: 403,
headers: [Object],
data: [Object]
},
request: {
method: 'POST',
url: 'https://api.github.com/repos/googleapis/google-cloud-ruby/pulls',
headers: [Object],
body: '{"title":"chore(main): release google-cloud-api_gateway 1.1.0","head":"yoshi-code-bot:release-please--branches--main--components--google-cloud-api_gateway","base":"main","body":":robot: I have created a release *beep* *boop*\\n---\\n\\n\\n### 1.1.0 (2022-07-01)\\n\\n#### Features\\n\\n* Updated minimum Ruby version to 2.6 ([#18443](https://github.com/googleapis/google-cloud-ruby/issues/18443)) \\n\\n---\\nThis PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).","maintainer_can_modify":true,"draft":false}',
request: [Object]
}
}
}
```
Contributor guide
Assessment
This issue has not been assessed yet.