wiki kerberos clone button fails with "undefined local variable or method 'project'"
Summary
A customer reported an issue cloning wiki repositories using kerberos. GitLab team members can find out more in the ticket.
The clone panel generates a 500 when the kerberos clone button code is called.
Started GET "/xx/yy/-/wikis/git_access" for 10.8.30.231 at 2021-02-09 11:14:58 +0100
Processing by Projects::WikisController#git_access as HTML
Parameters: {"namespace_id"=>"xx", "project_id"=>"yy"}
Completed 500 Internal Server Error in 487ms (ActiveRecord: 4.4ms | Elasticsearch: 0.0ms |
Allocations: 125330)
ActionView::Template::Error (undefined local variable or method `project' for
#<#<Class:0x00007faf710f29e0>:0x00007faf64533278>
Did you mean? @project):
ee/app/views/shared/_kerberos_clone_button.html.haml:3
app/helpers/application_helper.rb:17:in `render_if_exists'
app/views/shared/_clone_panel.html.haml:17
app/views/shared/wikis/git_access.html.haml:14
app/controllers/application_controller.rb:125:in `render'
app/controllers/concerns/wiki_actions.rb:190:in `git_access'
ee/lib/gitlab/ip_address_state.rb:10:in `with'
ee/app/controllers/ee/application_controller.rb:44:in `set_current_ip_address'
app/controllers/application_controller.rb:482:in `set_current_admin'
lib/gitlab/session.rb:11:in `with_session'
app/controllers/application_controller.rb:473:in `set_session_storage'
lib/gitlab/i18n.rb:73:in `with_locale'
lib/gitlab/i18n.rb:79:in `with_user_locale'
Steps to reproduce
Example Project
What is the current bug behavior?
click a button in wiki "Clone repository", a 500 error is generated.
What is the expected correct behavior?
the clone repository page is generated.
Relevant logs and/or screenshots
Output of checks
Possible fixes
As part of the group wiki work #207869 (closed) it seems like a fix to the clone panel !47676 (merged) made changes to the FOSS code that result in the EE kerberos code not being called with container
parameter when it still expects project
.
It looks like a single word change in the ee kerberbos clone button haml
project
needs to change to container
to match the FOSS code which now calls it with:
= render_if_exists 'shared/kerberos_clone_button', container: container
Edited by Ben Prescott_