Fix downloading of patches on public merge requests when user logged out
What does this MR do?
This MR makes it possible to download a diff patch on a public merge request when a user is logged out.
Why was this MR needed?
An Error 500 would result when a user attempted to click on the "Email Patches" or "Plain Diff" button:
NoMethodError - undefined method `id' for nil:NilClass:
lib/gitlab/backend/shell_env.rb:9:in `set_env'
lib/gitlab/satellite/action.rb:20:in `in_locked_and_timed_satellite'
lib/gitlab/satellite/merge_action.rb:49:in `diff_in_satellite'
app/models/merge_request.rb:219:in `to_diff'
app/controllers/projects/merge_requests_controller.rb:42:in `block (2 levels) in show'
What are the relevant issue numbers?
- Closes #1225 (closed)
- Closes #1854 (closed) (dup)
- Closes #1858 (closed) (dup)
Merge request reports
Activity
Reassigned to @dzaporozhets
/cc: @haynes
@stanhu You are awesome!@stanhu can you make ci green?
@haynes Haha.
@dzaporozhets Yeah, hit the retry button. Not sure why the Rspec tests were cancelled.
@jacobvosmaer any chance this makes it into the patch release as well?
It's not a regression because this has been broken for a long time, but it does fix a 500 error.mentioned in commit 541f7675
Is this a 7.12 regression?
@haynes I like seeing bugs fixed too but I do not want to turn the 7-12-stable branch into a zoo.
@jacobvosmaer I understand that. It is not a 7.12 regression. This has been broken for at least 3 months.
I guess it'll just be in 7.13 then. That's completly fine with me.
I just thought I would ask because it fixes a 500 error.OK 7.13 then. Thanks for asking @haynes.