Bitbucket repository import fails due to undefined method `id' for nil:NilClass
ZenDesk: https://gitlab.zendesk.com/agent/tickets/22999
Today I tried to import a repo from bitbucket, first time it just said failed. I removed the repo and group and then tried again, but this time I got a 500 error in dashboard and I couldn't access dashboard for some time. Now error is gone but project is still saying "Import in progress".
Using Kibana, I found the Sidekiq job ID by searching for "Import job started for [PROJECT]". Then I did a search for that job ID and saw these messages:
2016-05-09T07:18:55.196704+00:00 10.1.0.44 153 2016-05-09_07:18:55.19589 worker18 sidekiq: 2016-05-09T07:18:55.195Z 57972 TID-ouhhygicc RepositoryImportWorker JID-4d707c063c898cb917ec5756 INFO: start, INFO: start
2016-05-09T07:20:09.862886+00:00 10.1.0.44 436 2016-05-09_07:20:09.86145 worker18 sidekiq: 2016-05-09T07:20:09.859Z 57972 TID-ouhhygicc WARN: {"class"=>"RepositoryImportWorker", "args"=>[1162324], "retry"=>true, "queue"=>"gitlab_shell", "jid"=>"4d707c063c898cb917ec5756", "created_at"=>1462778335.1941822, "enqueued_at"=>1462778335.1942956, "error_message"=>"undefined method `id' for nil:NilClass", "error_class"=>"NoMethodError", "failed_at"=>1462778409.8585708, "retry_count"=>0}, "args"=>[1162324], "retry"=>true, "queue"=>"gitlab_shell", "jid"=>"4d707c063c898cb917ec5756", "created_at"=>1462778335.1941822, "enqueued_at"=>1462778335.1942956, "error_message"=>"undefined method `id' for nil:NilClass", "error_class"=>"NoMethodError", "failed_at"=>1462778409.8585708, "retry_count"=>0}
2016-05-09T07:20:09.862869+00:00 10.1.0.44 164 2016-05-09_07:20:09.86140 worker18 sidekiq: 2016-05-09T07:20:09.859Z 57972 TID-ouhhygicc RepositoryImportWorker JID-4d707c063c898cb917ec5756 INFO: fail: 74.664 sec, INFO: fail: 74.664 sec
Given that this was a Bitbucket import and it took 74 seconds to run, I suspect something went wrong with the import of issues. I wish the backtrace were more detailed.
/cc: @MrChrisW