Merge request in-progress spins indefinitely - failed merge due to git hook
The merge request is stuck at "Merge in progress" indefinitely when a git hooks refuses the merge. It seems to be caused by the the output from the hook of the the git operation which is too big for the table column.
Would it be possible to extend the merge_error
table column width or trim the output before it's stored into DB?
Affected version: GitLab CE 8.10.2
Error details:
{
"class": "MergeWorker",
"args": [
379,
125,
{
"utf8": "<E2><9C><93>",
"authenticity_token": "xyz",
"sha": "9b218b61fdd95ad4b189beb113b5dc663a724c37",
"commit_message": "Merge branch 'WEB-1234' into 'master' etc.",
"merge_when_build_succeeds": "",
"button": "",
"controller": "projects/merge_requests",
"action": "merge",
"namespace_id": "test",
"project_id": "test",
"id": "88"
}
],
"retry": true,
"queue": "default",
"jid": "fbbe7b0438c8d4bd02e78ea9",
"created_at": 1470215011.5687208,
"enqueued_at": 1470215011.5688584,
"error_message": "PG::StringDataRightTruncation: ERROR: value too long for type character varying(255)\n: UPDATE \"merge_requests\" SET \"merge_error\" = $1, \"updated_at\" = $2, \"in_progress_merge_commit_sha\" = $3, \"state\" = $4 WHERE \"merge_requests\".\"id\" = $5",
"error_class": "ActiveRecord::StatementInvalid",
"failed_at": 1470215016.3714142,
"retry_count": 0
}
Related to Issue https://gitlab.com/gitlab-org/gitlab-ee/issues/305