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

Response code 429 (Too Many Requests) on successComment #361

Open
vgropp opened this issue Apr 11, 2022 · 1 comment
Open

Response code 429 (Too Many Requests) on successComment #361

vgropp opened this issue Apr 11, 2022 · 1 comment
Labels

Comments

@vgropp
Copy link

vgropp commented Apr 11, 2022

We are running into the gitlab API limit on some projects when multiple semantic-releases are running at the same time from share IPs.

[8:07:42 AM] [semantic-release] › ℹ  Start step "success" of plugin "@semantic-release/gitlab"
[8:07:44 AM] [semantic-release] [@semantic-release/gitlab] › ✖  An error occurred while posting comments to related issues and merge requests:
HTTPError: Response code 429 (Too Many Requests)
    at Request.<anonymous> (/usr/local/lib/node_modules/@semantic-release/gitlab/node_modules/got/dist/source/as-promise/index.js:117:42)
    at processTicksAndRejections (node:internal/process/task_queues:96:5) {
  code: 'ERR_NON_2XX_3XX_RESPONSE',

As far as I understand the code

const getRelatedIssues = async mergeRequest => {
for very Commit the script is looking for a MR, with those MR the script is searching for an resolved issue. So there will be at least commits * MR Requests. As we do not use gitlab issues (but like the MR comment), what about a configuration to disable the Issue Comments and hence those requests? This will limit the requests to count of commits.

Another Option would be rate limiting the requests, but that seems like a lot more work but more sustainable solution.

@fgreinacher
Copy link
Contributor

Thanks for reporting this @vgropp!

You can disable the new feature by setting the successComment option to false.

Other than that I think it would make sense to add proper handling of such cases to this plugin.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants