Disabling pipelines must succeed option has no effect until MR is closed and reopened

Summary

If a merge request pipeline fails, and then we disable the "pipelines must succeed" option, MR is still blocked requiring a successful pipeline.

Steps to reproduce

  1. Create a new project
  2. Go to Settings > Merge requests and check the Pipelines must succeed checkbox (enable it). Click Save changes.
  3. Add .gitlab-ci.yml with a job that fails:
test:
  script:
    - exit 1
  1. Commit to a new branch and create merge request
  2. Check auto-merge option
  3. MR is blocked - expecting a successful pipeline
  4. Go to Settings > Merge requests and uncheck the Pipelines must succeed option (disable it). Click Save changes.
  5. Reload the MR. It is still blocked requiring a successful pipeline.

Example Project

https://gitlab.com/e_munn_ultimate_group/tests/ci-tests/auto-merge-testing/-/merge_requests/1

What is the current bug behavior?

After a reload of the MR page, the value of Pipelines must succeed doesn't get refreshed.

What is the expected correct behavior?

When Pipelines must succeed setting has changed, a reload of the MR should pull the new value for the setting.

Relevant logs and/or screenshots

Disabling Pipelines must succeed setting after the creation of MR with a failed pipeline has no effect on the mergeability check.

Screenshot_2025-02-10_at_15.00.19

Output of checks

This bug happens on GitLab.com

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`)

Possible fixes

Close the MR and reopen it.

Edited by Elif Munn