dblock/create-a-github-issue

Error: You have exceeded a secondary rate limit. Please wait a few minutes before you try again.

Opened this issue · 13 comments

As per Github docs it should retry after a period of time based off the HTTP response header "Retry-After: ".

https://docs.github.com/en/rest/guides/best-practices-for-integrators?apiVersion=2022-11-28#dealing-with-secondary-rate-limits

Error: You have exceeded a secondary rate limit. Please wait a few minutes before you try again.
✖  fatal     HttpError: You have exceeded a secondary rate limit. Please wait a few minutes before you try again. 
    at /tmp/github-runner-your-repo/_actions/dblock/create-a-github-issue/v3/dist/index.js:6038:21
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at async createAnIssue (/tmp/github-runner-your-repo/_actions/dblock/create-a-github-issue/v3/dist/index.js:37939:32)

It's a good idea. Maybe there's built in support for rate limit / retry in https://github.com/actions/toolkit?

It's a good idea. Maybe there's built in support for rate limit / retry in https://github.com/actions/toolkit?

I dont think that toolkit is being maintained much anymore.

Even basic commands like Curl have built in support now days. .e.g curl --retry 5

https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Retry-After

It's a good idea. Maybe there's built in support for rate limit / retry in https://github.com/actions/toolkit?

I dont think that toolkit is being maintained much anymore.

I see commits a few days ago. Either way I'd start there and implement a retry in a way that's a bit lower level than create-a-github-issue, then we can always include that code here if needed.

Great, look forward to testing it out.

Great, look forward to testing it out.

Looking forward to your PR!

Was there any progress on this issue?

Was there any progress on this issue?

Haven't heard from @SteveBox0. AFAIK nobody is working on this.

Hey I have just noticed one more error related to this topic
error https://github.com/opensearch-project/opensearch-build/actions/runs/5565445928/jobs/10165812163

  title: '[RELEASE] Release version 2.9.0',
  labels: [ 'untriaged', 'release', 'v2.9.0' ]
}
ℹ  info      Fetching allissues with title "[RELEASE] Release version 2.9.0"
ℹ  info      No existing issue found to update
ℹ  info      Creating new issue [RELEASE] Release version 2.9.0
✖  error     An error occurred while creating the issue. This might be caused by a malformed issue title, or a typo in the labels or assignees. Check .github/ISSUE_TEMPLATE/release_template.md!
✖  error     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/work/_actions/dblock/create-a-github-issue/v3.0.0/dist/index.js:5310:23
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at async createAnIssue (/home/runner/work/_actions/dblock/create-a-github-issue/v3.0.0/dist/index.js:33090:23)
Error: An error occurred while creating the issue. This might be caused by a malformed issue title, or a typo in the labels or assignees. Check .github/ISSUE_TEMPLATE/release_template.md!

You have exceeded a secondary rate limit and have been temporarily blocked from content creation. Please retry your request again later.

Even If the run fails with limit errors, this does not stop from the issue creation, ideally if the step fails with error secondary rate limit, it should stop moving forward with issue creation, now this created some duplicate issues with same title as [RELEASE] Release version 2.9.0 even though the option search_existing: all is added.

@dblock @SteveBox0 have you noticed the same issue ?

Thanks

dblock commented

@prudhvigodithi I'm pretty sure that the issue is not created, your example above shows 2.9.0 while this screenshot is 2.6.0 (different numbers)? This issue is a feature request to retry.

Hey @dblock, same with 2.9.0 (Run: https://github.com/opensearch-project/opensearch-build/actions/runs/5565445928/jobs/10165812163 ), added 2.6.0 as an error example.
Screenshot 2023-07-17 at 10 08 42 AM
There is already an open issue for 2.9.0 opensearch-project/opensearch-build#3616 and the run created multiple 2.9.0 issues, I will do another round of debugging.
Thanks

Error:

  title: '[RELEASE] Release version 2.9.0',
  labels: [ 'untriaged', 'release', 'v2.9.0' ]
}
ℹ  info      Fetching allissues with title "[RELEASE] Release version 2.9.0"
ℹ  info      No existing issue found to update
ℹ  info      Creating new issue [RELEASE] Release version 2.9.0
✖  error     An error occurred while creating the issue. This might be caused by a malformed issue title, or a typo in the labels or assignees. Check .github/ISSUE_TEMPLATE/release_template.md!
dblock commented

@prudhvigodithi it would be a separate bug - this one is a feature request for retrying, so please open another one if you see something not working

Thanks will create a new issue related to this topic.