Merge when pipeline succeeds refresh failure (#40246) · Issues · GitLab.org / GitLab FOSS · GitLab (original) (raw)

Skip to content

Merge when pipeline succeeds refresh failure

Summary

Custom hooks when failing cause Merge Requests with pipelines set to merge on success display refresh button which does nothing.

Steps to reproduce

  1. Create Project/Repository
    • Create new Branch/Commit
    • Set Commit Build status to running
curl --request POST --header "$TOKEN" http://gitlab_test/api/v4/projects/1/statuses/$SHA?state=running
  1. Add Failing Custom Hook
    • Add custom_hook (/var/opt/gitlab/git-data/repositories/group/project.git/custom_hooks/pre-receive)
#!/bin/bash
echo "Always Fail"
exit 1
  1. Create new Merge Request
    • Select 'Merge when pipeline succeeds'
  2. Update Commit Build status to finished
curl --request POST --header "$TOKEN" http://gitlab_test/api/v4/projects/1/statuses/$SHA?state=success
  1. Click "Refresh" button

What is the current bug behavior?

No action appears to take place.

What is the expected correct behavior?

Report updated status/allow merge attempt

Relevant logs and/or screenshots

No output in Chrome Console Logs

# Gitlab Tail
==> /var/log/gitlab/gitlab-rails/production.log <==
Started GET "/project/group/merge_requests/5.json" for 10.0.2.2 at 2017-11-16 18:15:12 +0000
Processing by Projects::MergeRequestsController#show as JSON
  Parameters: {"namespace_id"=>"project", "project_id"=>"group", "id"=>"5"}
Completed 200 OK in 172ms (Views: 2.3ms | ActiveRecord: 23.2ms | Elasticsearch: 0.0ms)

==> /var/log/gitlab/gitlab-workhorse/current <==
2017-11-16_18:15:12.62302 gitlab_test @ - - [2017-11-16 18:15:12.427991297 +0000 UTC] "GET /project/group/merge_requests/5.json HTTP/1.1" 304 0 "http://gitlab_test/project/group/merge_requests/5" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/61.0.3163.100 Safari/537.36" 0.194632

==> /var/log/gitlab/nginx/gitlab_access.log <==
10.0.2.2 - - [16/Nov/2017🔞15:12 +0000] "GET /project/group/merge_requests/5.json HTTP/1.1" 304 0 "http://gitlab_test/project/group/merge_requests/5" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/61.0.3163.100 Safari/537.36"

==> /var/log/gitlab/gitlab-monitor/current <==
2017-11-16_18:15:12.82778 127.0.0.1 - - [16/Nov/2017🔞15:12 UTC] "GET /sidekiq HTTP/1.1" 200 5631
2017-11-16_18:15:12.82796 - -> /sidekiq

merge_request

Results of GitLab environment info

System information
System:		Ubuntu 16.04
Proxy:		no
Current User:	git
Using RVM:	no
Ruby Version:	2.3.5p376
Gem Version:	2.6.13
Bundler Version:1.13.7
Rake Version:	12.1.0
Redis Version:	3.2.5
Git Version:	2.13.6
Sidekiq Version:5.0.4
Go Version:	unknown

GitLab information
Version:	10.1.4-ee
Revision:	a512054
Directory:	/opt/gitlab/embedded/service/gitlab-rails
DB Adapter:	postgresql
DB Version:	9.6.5
Elasticsearch:	no
Geo:		no
Using LDAP:	no
Using Omniauth:	no

GitLab Shell
Version:	5.9.3
Repository storage paths:
- default: 	/var/opt/gitlab/git-data/repositories
  Hooks:	/opt/gitlab/embedded/service/gitlab-shell/hooks
  Git:	/opt/gitlab/embedded/bin/git

Design

Display the merge failure error message as shown below.

merge-failure-message

Alert component design spec →

Customers

https://gitlab.my.salesforce.com/00161000002xBfL

Edited Dec 07, 2020 by 🤖 GitLab Bot 🤖