500 when opening merge request after migration from 5.0.1 to 6.5.1 (2ffa03ab)
Created by: piotrgo
Hi,
after the migration I am experiencing issues with merge request page. For some repositories it won't show at all throwing 500, and for some repos it will show open requests, but when trying to access it will throw 500. On repo that opens the MR page I could create new MR and can open it without any problems. In that repo I can't open migrated MR.
Output from production.log is as follows:
For newly created merge request:
Started GET "/projects/project_1/merge_requests/409" for 127.0.0.1 at 2014-03-12 10:15:16 +0000 Processing by Projects::MergeRequestsController#show as HTML Parameters: {"project_id"=>"projects/project_1", "id"=>"409"} Rendered votes/_votes_block.html.haml (3.0ms) Rendered projects/merge_requests/show/_mr_title.html.haml (13.3ms) Rendered projects/merge_requests/show/_how_to_merge.html.haml (6.1ms) Rendered projects/merge_requests/show/_mr_box.html.haml (10.0ms) Rendered projects/merge_requests/show/_mr_accept.html.haml (9.9ms) Rendered projects/commits/_commit.html.haml (6.9ms) Rendered projects/commits/_commit.html.haml (3.1ms) Rendered projects/commits/_commit.html.haml (3.0ms) Rendered projects/merge_requests/show/_commits.html.haml (17.9ms) Rendered projects/notes/_notes.html.haml (1.1ms) Rendered projects/notes/_form.html.haml (9.9ms) Rendered projects/notes/_notes_with_form.html.haml (14.3ms) Rendered projects/merge_requests/_show.html.haml (92.0ms) Rendered projects/merge_requests/show.html.haml within layouts/projects (95.3ms) Rendered layouts/_head.html.haml (0.8ms) Rendered layouts/_broadcast.html.haml (1.0ms) Rendered layouts/_search.html.haml (0.8ms) Rendered layouts/_head_panel.html.haml (5.3ms) Rendered layouts/_init_auto_complete.html.haml (0.4ms) Rendered layouts/_flash.html.haml (0.1ms) Rendered shared/_no_ssh.html.haml (0.9ms) Rendered layouts/nav/_project.html.haml (16.9ms) Completed 200 OK in 186ms (Views: 123.6ms | ActiveRecord: 5.2ms)
For existing merge request:
Started GET "/projects/project_1/merge_requests/406" for 127.0.0.1 at 2014-03-12 10:15:27 +0000
Processing by Projects::MergeRequestsController#show as HTML
Parameters: {"project_id"=>"projects/project_1", "id"=>"406"}
Completed 500 Internal Server Error in 45ms
NoMethodError (undefined method 'id' for nil:NilClass):
app/models/commit.rb:53:in 'id'
app/models/merge_request.rb:338:in 'new'
app/models/merge_request.rb:338:in 'block in load_commits'
app/models/merge_request.rb:338:in 'map'
app/models/merge_request.rb:338:in 'load_commits'
app/models/merge_request.rb:180:in 'commits'
app/controllers/projects/merge_requests_controller.rb:200:in 'validates_merge_request'
app/controllers/application_controller.rb:57:in 'set_current_user_for_thread'
As part of migration I have run
bundle exec rake db:migrate RAILS_ENV=production
bundle exec rake gitlab:import:repos RAILS_ENV=production
bundle exec rake migrate_iids RAILS_ENV=production
All checks are green
I am migrating to the brand new box (Debian) created exactly as per instructions from gitlab (DB is mysql).
Am I missing something?