Gitlab::GithubImport::RateLimitError: Gitlab::GithubImport::RateLimitError
Summary
GitHub to GitLab import fails with Gitlab::GithubImport::RateLimitError
Steps to reproduce
Example Project
What is the current bug behavior?
The import fails silently and does not present errors to the user.
What is the expected correct behavior?
When the import fails, the user should be notified and offered corrective actions.
Note: This is not a bug but expected behavior when the user is rate limited during an import. However, we should log this as a warning rather than an error.
Out of scope (follow-up): Notify the user via a UI warning/error when they hit a rate limit.
Relevant logs and/or screenshots
https://sentry.gitlab.net/gitlab/gitlabcom/issues/4151517/?referrer=gitlab_plugin
Gitlab::GithubImport::RateLimitError: Gitlab::GithubImport::RateLimitError
lib/gitlab/github_import/client.rb:212:in `raise_or_wait_for_rate_limit'
raise RateLimitError
lib/gitlab/github_import/client.rb:177:in `with_rate_limit'
raise_or_wait_for_rate_limit unless requests_remaining?
lib/gitlab/github_import/client.rb:73:in `user'
with_rate_limit { octokit.user(username).to_h }
lib/gitlab/github_import/user_finder.rb:120:in `email_for_github_username'
user = client.user(username)
lib/gitlab/github_import/user_finder.rb:86:in `find'
email = email_for_github_username(username)
...
(97 additional frame(s) were not displayed)
Output of checks
This bug happens on GitLab.com
Results of GitLab environment info
Expand for output related to GitLab environment info
(For installations with omnibus-gitlab package run and paste the output of: `sudo gitlab-rake gitlab:env:info`) (For installations from source run and paste the output of: `sudo -u git -H bundle exec rake gitlab:env:info RAILS_ENV=production`)
Results of GitLab application Check
Expand for output related to the GitLab application check
(For installations with omnibus-gitlab package run and paste the output of:
sudo gitlab-rake gitlab:check SANITIZE=true
)(For installations from source run and paste the output of:
sudo -u git -H bundle exec rake gitlab:check RAILS_ENV=production SANITIZE=true
)(we will only investigate if the tests are passing)