Resolving merge conflicts from a forked repo through UI

Summary

Using a Forking Workflow users are unable to use the 8.11 conflict resolution in the UI. Selecting code either "Use ours" or "Use theirs" generates an error "Something went wrong on our end"

Steps to reproduce

  1. Fork repo from a group project into a personal space
  2. Add a commit to personal space repo to generate a conflict, ie README.md
  3. Commit a change to group project to generate conflict, ie README.md
  4. Create merge request from personal space repo to group project
  5. Use the UI to resolve the conflicts, select either "Use ours" or "Use theirs" - both will cause the error

Relevant logs and/or screenshots

From gitlab-rails/production.log:

Started POST "/linux-testing/mytest/merge_requests/2/resolve_conflicts" for 10.23.54.190 at 2016-08-25 13:33:24 -0500 Processing by Projects::MergeRequestsController#resolve_conflicts as / Parameters: {"commit_message"=>"Merge branch 'master' into 'feature2'\n\n# Conflicts:\n# README.md", "sections"=>{"8ec9a00bfd09b3190ac6b22251dbb1aa95a0579d_1_1"head"}, "namespace_id"=>"linux-testing", "project_id"=>"mytest", "id"=>"2"} Completed 500 Internal Server Error in 59ms (ActiveRecord: 5.4ms) Rugged::OdbError (Object not found - no match for id (170af3a69aa29327d60c0fd5168e58f40fd9966f)): app/models/repository.rb:900:in create' app/models/repository.rb:900:in block in resolve_conflicts' app/models/repository.rb:1014:in commit_with_hooks' app/models/repository.rb:897:in resolve_conflicts' app/services/merge_requests/resolve_service.rb:20:in execute' app/controllers/projects/merge_requests_controller.rb:166:in resolve_conflicts' lib/gitlab/request_profiler/middleware.rb:15:in call' lib/gitlab/middleware/go.rb:16:in call'

Results of GitLab Environment Info

Appears present on gitlab.com along with our internal environment

System information System: RedHatEnterpriseServer 6.8 Current User: git Using RVM: no Ruby Version: 2.3.1p112 Gem Version: 2.6.6 Bundler Version:2.3.0 Rake Version: 10.5.0 Sidekiq Version:4.1.4

GitLab information Version: 8.11.0 Revision: 346e677e Directory: /opt/gitlab/embedded/service/gitlab-rails DB Adapter: postgresql URL: https://git-corp-d1.example.com HTTP Clone URL: https://git-corp-d1.example.com/some-group/some-project.git SSH Clone URL: git@git-corp-d1.example.com:some-group/some-project.git Using LDAP: yes Using Omniauth: no

GitLab Shell Version: 3.4.0 Repository storage paths:

  • default: /var/opt/gitlab/git-data/repositories Hooks: /opt/gitlab/embedded/service/gitlab-shell/hooks/ Git: /opt/gitlab/embedded/bin/git