Skip to content

Fix a 500 error viewing an MR with a deleted source project

What does this MR do?

Allows merged MRs to be shown without any 500 errors if the source project is removed

Are there points in the code the reviewer needs to double check?

https://gitlab.com/gitlab-org/gitlab-ce/commit/31c37c6c38258684fc92e0d91119c33872e39034 fixed this for closed MRs only. I had trouble understanding the introduced helper and logic, so reverted it and keyed everything on the existence of the source project or branch directly.

commits.json returns a 500 error for a closed or merged MR; the approach taken in the above MR was to hide the commits... tab, so I've run with that.

For merged MRs, the commits (but not the pipeline data) are in the target project, so we could do better, but it's a fairly nasty intervention to make it happen.

Why was this MR needed?

Viewing merged MRs should work even if the fork they came from has been deleted or unlinked.

Screenshots (if relevant)

Screen_Shot_2016-10-19_at_17.56.37

Does this MR meet the acceptance criteria?

What are the relevant issue numbers?

Closes #23341 (closed)

Merge request reports