Improve Github Rate limiting API behavior on Project Import
Follow up of this comment
Context
Github has a rate limit on its API of 5000 requests per user/hour, which can prevent the project from being imported. The end result is that the GitLab import errors out, which often becomes a GitLab support issue.
![GitHub HTTP Response](/-/project/278964/uploads/ea5f3bbab759672b217128747e188be5/image.png)
![](/-/project/278964/uploads/1ad745bf760b66c0490c3178bd2157eb/image.png)
Proposed solutions
copy and paste from this comment
- What should be the solution for migrating a large number of objects out of GitHub?
- Auto-retry? Retrying may not help if the user keeps hitting the limit.
- Would it be possible to pause the import if we detect this error and resume automatically at the given time? And the message could say that GitHub API call rate limit was reached and the import will resume at the given time.
- Or, alternatively, let the user set a limit/throttle for our importer to slow down and stay under the GitHub limit?
- Or, preferably, try to auto-adjust our rate using the GitHub HTTP response data, which would avoid getting the error?
Edited by Haris Delalić