button `Resolve conflicts` missing from merge request

Summary

The MR widget for conflicts does not render the Resolve conflicts button when the source branch is protected. It only renders the Resolve locally button.

Workaround

Navigate directly to /conflicts

Steps to reproduce

  1. Create an MR merge main into test branch with conflict
    • resulting in a merge conflict with protected branch into unprotected branch
  2. Notice that there is no Resolve conflicts button in the MR widget.

Example Project

nelbacha/conflict-testing!1 (merged)

What is the current bug behavior?

The Resolve Conflict button is not rendered

image

What is the expected correct behavior?

The Resolve Conflict button is rendered:

image

Relevant logs and/or screenshots

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

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)

Possible fixes

See notes.

Edited by Nourdin el Bacha