MergeRequestSerializer breaks on `MergeRequest#rebase_dir_path` when source_project doesn't exist anymore
https://sentry.gitlap.com/gitlab/gitlabcom/issues/15119/ https://sentry.gitlap.com/gitlab/gitlabcom/issues/15116/ (similar)
NoMethodError: undefined method `id' for nil:NilClass
app/models/merge_request.rb:787:in `rebase_dir_path'
File.join(Gitlab.config.shared.path, 'tmp/rebase', source_project.id.to_s, id.to_s).to_s
app/models/merge_request.rb:791:in `rebase_in_progress?'
File.exist?(rebase_dir_path) && !clean_stuck_rebase
app/controllers/projects/merge_requests_controller.rb:64:in `block (2 levels) in show'
render json: MergeRequestSerializer.new.represent(@merge_request, type: :full)
app/controllers/projects/merge_requests_controller.rb:60:in `show'
respond_to do |format|
lib/gitlab/request_profiler/middleware.rb:15:in `call'
@app.call(env)
...
(136 additional frame(s) were not displayed)
The source_project
doesn't exist anymore, we should handle that more gracefully.