Merge request fails with message "Something went wrong during merge"
Zendesk issue: https://gitlab.zendesk.com/agent/tickets/24435
If you have githook Check whether author is a GitLab user enabled when doing a mergerequest it will fail silently with "Something went wrong during merge". As the uses of this gitlab instance can't ssh the server and watch the logs, the message in frontend should be made more clear to the user.
It woould be more helpful if the message was something in the lines of "The author in one of the commits are not a registered gitlab user, please either disable the Check whether author is a GitLab user githook under project settings or tell your system administrator to help you merge this request."
Another way would be to make sidekiq be able to ignore that hook in some cases maybe?
Setup to replicate bug:
- Create a repo
- Do commits
- Create a branch ie. develop
- Import some commits with a nonexistant author in gitlab from i.e. mailpatches or other synced repo
- Temporarily disable the Check whether author is a GitLab user hook to be able to push the commits
- Push the commits to your other branch i.e develop
- Enable the "Check whether author is a GitLab user" hook again
- Create a MR from develop to master
- Accept it
- Watch it fail with a cryptic *"Something went wrong during merge" *
Logoutput from gitlab-ctl tail:
==> /var/log/gitlab/gitlab-rails/production.log <==
Started GET "/synotio/gitlab-bugreport/merge_requests/1" for 127.0.0.1 at 2016-05-02 15:39:04 +0200
Processing by Projects::MergeRequestsController#show as JSON
Parameters: {"namespace_id"=>"synotio", "project_id"=>"gitlab-bugreport", "id"=>"1"}
Completed 200 OK in 112ms (Views: 1.3ms | ActiveRecord: 8.5ms)
==> /var/log/gitlab/gitlab-workhorse/current <==
2016-05-02_13:39:04.57519 git gitlab-workhorse: git.synotio.se @ - - [2016-05-02 15:39:04.455106786 +0200 CEST] "GET /synotio/gitlab-bugreport/merge_requests/1 HTTP/1.1" 200 584 "https://git.synotio.se/synotio/gitlab-bugreport/merge_requests/1" "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/49.0.2623.112 Safari/537.36" 0.119955
==> /var/log/gitlab/nginx/gitlab_access.log <==
10.30.10.51 - - [02/May/2016:15:39:04 +0200] "GET /synotio/gitlab-bugreport/merge_requests/1 HTTP/2.0" 200 1024 "https://git.synotio.se/synotio/gitlab-bugreport/merge_requests/1" "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/49.0.2623.112 Safari/537.36"
==> /var/log/gitlab/gitlab-rails/production.log <==
Started POST "/api/v3/internal/allowed" for 127.0.0.1 at 2016-05-02 15:39:04 +0200
==> /var/log/gitlab/gitlab-shell/gitlab-shell.log <==
I, [2016-05-02T15:39:04.681262 #24628] INFO -- : POST http://127.0.0.1:8080/api/v3/internal/allowed 0.07721
==> /var/log/gitlab/sidekiq/current <==
2016-05-02_13:39:04.68149 git sidekiq: GitLab: Author 'bug@plux.se' is not a member of team
==> /var/log/gitlab/gitlab-rails/production.log <==
Git operation was rejected by pre-receive hook
==> /var/log/gitlab/sidekiq/current <==
2016-05-02_13:39:04.70003 git sidekiq: 2016-05-02T13:39:04.699Z 11928 TID-xv768 ElasticIndexerWorker JID-6fd583449cad98788ff2b447 INFO: start
2016-05-02_13:39:04.71656 git sidekiq: 2016-05-02T13:39:04.716Z 11928 TID-xv8gc ElasticIndexerWorker JID-896ce2c8bdfba1be4bca4bfb INFO: start
2016-05-02_13:39:04.78411 git sidekiq: 2016-05-02T13:39:04.784Z 11928 TID-xvbcs MergeWorker JID-ec356de67e213e540f4f7a22 INFO: done: 1.634 sec
2016-05-02_13:39:04.78712 git sidekiq: 2016-05-02T13:39:04.787Z 11928 TID-xv768 ElasticIndexerWorker JID-6fd583449cad98788ff2b447 INFO: done: 0.087 sec
2016-05-02_13:39:04.83139 git sidekiq: 2016-05-02T13:39:04.831Z 11928 TID-xv8gc ElasticIndexerWorker JID-896ce2c8bdfba1be4bca4bfb INFO: done: 0.115 sec
Gitlab version: gitlab-ee 8.7.0 (Centos 7 omnibus RPM)