Fix sourcegraph breaking on project resolve endpoint
What does this MR do and why?
This MR fixes a bug where visiting projects/:id
with the Sourcegraph feature enabled would cause a 500. This happened because the private project
method, which is referenced by the SourcegraphDecorator, expects a namespace_id
.
Screenshots or screen recordings
Screencast_2022-03-08_16_38_29
How to set up and validate locally
- Enable Sourcegraph for the GitLab instance
- Visit the
projects/:id
route like/projects/2
- You should be redirected to the full project path and not see any errors
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Thanks
Thanks so much @cwoolley-gitlab for pairing with me on this!!
Related to #351058 (closed)
Edited by Luke Duncalfe