Skip to content

Fix sourcegraph breaking on project resolve endpoint

Paul Slaughter requested to merge 351058-fix-projects-id-redirect-500 into master

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

  1. Enable Sourcegraph for the GitLab instance
  2. Visit the projects/:id route like /projects/2
  3. 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.

Thanks

Thanks so much @cwoolley-gitlab for pairing with me on this!!

Related to #351058 (closed)

Edited by Luke Duncalfe

Merge request reports