500 when pushing code to instance without license configured
This is a first bug found by end to end tests. Tested with gitlab/gitlab-ee:latest
.
It appears that when you push code to GitLab instance when there is no license configured, GitLab will respond with 500 instead of informing that license is required.
NameError (undefined local variable or method `new_admin_license_path' for LicenseHelper:Module):
app/helpers/license_helper.rb:49:in `no_license_message'
app/helpers/license_helper.rb:16:in `license_message'
lib/gitlab/git_access.rb:99:in `user_push_access_check'
lib/gitlab/git_access.rb:73:in `push_access_check'
lib/gitlab/git_access.rb:43:in `check'
app/controllers/projects/git_http_controller.rb:92:in `access_check'
app/controllers/projects/git_http_controller.rb:102:in `receive_pack_allowed?'
app/controllers/projects/git_http_controller.rb:9:in `info_refs'
lib/gitlab/request_profiler/middleware.rb:15:in `call'
lib/gitlab/middleware/go.rb:16:in `call'
lib/gitlab/middleware/readonly_geo.rb:29:in `call'
See https://gitlab.com/gitlab-org/gitlab-qa/builds/3334896
Spec
- When pushing code to an instance with no license set, return a message through git similar to
remote:
remote: You need to add a valid license in your GitLab instance to complete this operation.
remote: