Auto disable "Pipeline Must Succeed" not clear in UI
Summary
In !162462 (merged) an auto disable was introduced for "Pipeline Must Succeed" for security policy projects.
In the current implementation the setting is always inactive in the UI, even if the user tries to activate it. This can give the impression that saving the setting silently fails.
Also when checking the setting using the API, we can see that only_allow_merge_if_pipeline_succeeds
shows true
, which does not match the UI and can lead to more confussion.
Related: https://gitlab.com/gitlab-com/request-for-help/-/issues/2479 (internal)
Steps to reproduce
- Create a security policy using the instructions from our docs.
- Navitgate to the newly created project
<project name> - Security policy project
- Navigate to
Settings -> Merge Requests -> Merge checks
and enablePipeline Must Succeed
- Save the settings and observe the checkbox is disabled after the page is refreshed
- Go to
https://<gitlab instance>/apu/v4/projects/<project id>
and observe thatonly_allow_merge_if_pipeline_succeeds
is set totrue
Example Project
What is the current bug behavior?
- There is no indication in the UI on why the "Pipeline Must Succeed" cannot be checked.
- The API does not match the UI
What is the expected correct behavior?
- The "Pipeline Must Succeed" should be greyed out with the reason in a tooltip.
- The API and UI should match
Relevant logs and/or screenshots
Output of checks
Results of GitLab environment info
Expand for output related to GitLab environment info
(For installations with omnibus-gitlab package run and paste the output of: `sudo gitlab-rake gitlab:env:info`) (For installations from source run and paste the output of: `sudo -u git -H bundle exec rake gitlab:env:info RAILS_ENV=production`)
Results of GitLab application Check
Expand for output related to the GitLab application check
(For installations with omnibus-gitlab package run and paste the output of:
sudo gitlab-rake gitlab:check SANITIZE=true
)(For installations from source run and paste the output of:
sudo -u git -H bundle exec rake gitlab:check RAILS_ENV=production SANITIZE=true
)(we will only investigate if the tests are passing)