500 Error when attempting to view MR after its target branch was deleted
Summary
Merge Request pages throw 500 error when the target branch is deleted
Steps to reproduce
- Create a branch
example1
- Create a MR from branch
example1
targeting default branch (e.g.develop
) - Create a branch
example2
fromexample1
- Create a MR from branch
example2
targeting theexample1
branch from the first MR - Merge the first MR from
example1
into target branch checking the option to delete the branchexample1
- Attempting to open MR2 for
example2
branch will now cause a 500 error (see example MR below)
Example Project
https://gitlab.com/joshfriend/deleted-target-branch-bug/merge_requests/3
What is the current bug behavior?
500 Internal Server Error
What is the expected correct behavior?
I should be able to view the MR and edit it's target branch
Relevant logs and/or screenshots
I do not currently have access to the logs, but I'm working on it.
Output of checks
This bug happens on GitLab.com
Our organization is running 11.0.2-ee internally as well, which is where I found this behavior originally.
gitlab-ee2278648 gitlab-ee3630472
Edited by Josh Friend