Error when closing or editing project imported Merge Requests - v8.10.2
Summary
Customer has exported a project from GitLab v8.9.3 and attempted to import the project into 8.10.2. When editing or closing merge requests that have been imported an error occurs.
Reproduce
Difficult to reproduce as this may be related to the state of the repository.
Expected
Merge requests can be edited or closed.
Actual
For see that all the merge requests are also imported. But I see a warning as "Cannot be merged automatically". I have also attached related screenshot also. So what I did is I just opened the merge request, I see as an error message. After opening the merge request I see only two options 1. Close & 2. Edit. When I clicked Close, 500 error is thrown. Error related logs are as below:
Started PUT "/RETRACED/RETRACED/merge_requests/2?merge_request%5Bstate_event%5D=close" for 10.103.66.138 at 2016-08-04 07:25:49 +0200
Processing by Projects::MergeRequestsController#update as HTML
Parameters: {"authenticity_token"=>"REMOVED", "merge_request"=>{"state_event"=>"close"}, "namespace_id"=>"RETRACED", "project_id"=>"RETRACED", "id"=>"2"}
Completed 500 Internal Server Error in 457ms (ActiveRecord: 82.5ms)
NoMethodError (undefined method `xmlschema' for "2016-07-22T13:34:21.000+02:00":String):
app/models/commit.rb:159:in `hook_attrs'
app/models/merge_request.rb:427:in `hook_attrs'
app/models/concerns/issuable.rb:216:in `to_hook_data'
app/services/merge_requests/base_service.rb:21:in `hook_data'
app/services/merge_requests/base_service.rb:29:in `execute_hooks'
app/services/merge_requests/close_service.rb:13:in `execute'
app/services/issuable_base_service.rb:124:in `change_state'
app/services/issuable_base_service.rb:103:in `update'
app/services/merge_requests/update_service.rb:17:in `execute'
app/controllers/projects/merge_requests_controller.rb:195:in `update'
lib/gitlab/middleware/go.rb:16:in `call'
lib/gitlab/middleware/readonly_geo.rb:29:in `call'
When I clicked on Edit, 500 error is thrown. Error related logs are as followed:
Started GET "/RETRACED/RETRACED/merge_requests/3/edit" for 10.103.66.138 at 2016-08-04 07:39:28 +0200
Processing by Projects::MergeRequestsController#edit as HTML
Parameters: {"namespace_id"=>"RETRACED", "project_id"=>"RETRACED", "id"=>"3"}
Completed 500 Internal Server Error in 110ms (ActiveRecord: 4.3ms)
ActionView::Template::Error (undefined method `protected_branch?' for nil:NilClass):
174: - if @merge_request.new_record?
175:
176: = link_to 'Change branches', mr_change_branches_path(@merge_request)
177: - if @merge_request.can_remove_source_branch?(current_user)
178: .form-group
179: .col-sm-10.col-sm-offset-2
180: .checkbox
app/models/merge_request.rb:385:in `can_remove_source_branch?'
app/views/shared/issuable/_form.html.haml:177:in `_app_views_shared_issuable__form_html_haml__2427163408193303480_168671880'
app/views/projects/merge_requests/_form.html.haml:2:in `block in _app_views_projects_merge_requests__form_html_haml__3337303551881003316_167980840'
app/views/projects/merge_requests/_form.html.haml:1:in `_app_views_projects_merge_requests__form_html_haml__3337303551881003316_167980840'
app/views/projects/merge_requests/edit.html.haml:6:in `_app_views_projects_merge_requests_edit_html_haml__3486323389518894841_168536860'
lib/gitlab/middleware/go.rb:16:in `call'
lib/gitlab/middleware/readonly_geo.rb:29:in `call'
Application and Environment information
- Omnibus: "GitLab Enterprise Edition 8.10.2-ee 15c7b91c"
ZD: https://gitlab.zendesk.com/agent/tickets/28717
//cc @gvreddy579