500 error when browsing to Settings -> Repository since 10.8 (NoMethodError)
Summary
Users are unable to browse to the Settings -> Repository page within a repository. This error began occuring after upgrading from 10.7.4 to 10.8, and was not remedied in 10.8.1.
Steps to reproduce
Click on Settings -> Repository.
What is the current bug behavior?
GitLab returns a 500 status/error page.
What is the expected correct behavior?
Users should see the repository settings page.
Relevant logs and/or screenshots
==> /var/log/gitlab/gitlab-rails/production_json.log <==
{"method":"GET","path":"/redacted-org/redacted-repo/settings/repository","format":"html","controller":"Projects::Settings::RepositoryController","action":"show","status":500,"error":"NoMethodError: undefined method `only_protected_branches=' for #<RemoteMirror:0x00007f2820d61010>","duration":40.3,"view":0.0,"db":2.07,"time":"2018-05-24T23:09:41.493Z","params":[{"key":"namespace_id","value":"redacted-org"},{"key":"project_id","value":"redacted-repo"}],"remote_ip":"redacted-ip","user_id":16,"username":"redacted-user"}
==> /var/log/gitlab/gitlab-rails/production.log <==
NoMethodError (undefined method `only_protected_branches=' for #<RemoteMirror:0x00007f2820d61010>):
app/controllers/projects/settings/repository_controller.rb:47:in `remote_mirror'
lib/gitlab/i18n.rb:50:in `with_locale'
lib/gitlab/i18n.rb:56:in `with_user_locale'
app/controllers/application_controller.rb:350:in `set_locale'
lib/gitlab/middleware/multipart.rb:95:in `call'
lib/gitlab/request_profiler/middleware.rb:14:in `call'
lib/gitlab/middleware/go.rb:17:in `call'
lib/gitlab/etag_caching/middleware.rb:11:in `call'
lib/gitlab/middleware/read_only/controller.rb:28:in `call'
lib/gitlab/middleware/read_only.rb:16:in `call'
lib/gitlab/request_context.rb:18:in `call'
lib/gitlab/metrics/requests_rack_middleware.rb:27:in `call'
lib/gitlab/middleware/release_env.rb:10:in `call'
Results of GitLab environment info
Expand for output related to GitLab environment info
System information System: Ubuntu 16.04 Current User: git Using RVM: no Ruby Version: 2.3.7p456 Gem Version: 2.6.14 Bundler Version:1.13.7 Rake Version: 12.3.1 Redis Version: 3.2.11 Git Version: 2.16.3 Sidekiq Version:5.0.5 Go Version: unknown
GitLab information Version: 10.8.1 Revision: 21a8d61 Directory: /opt/gitlab/embedded/service/gitlab-rails DB Adapter: postgresql URL: https://redacted HTTP Clone URL: https://redacted/some-group/some-project.git SSH Clone URL: git@redacted:some-group/some-project.git Using LDAP: yes Using Omniauth: yes Omniauth Providers: saml
GitLab Shell Version: 7.1.2 Repository storage paths:
- default: /var/opt/gitlab/git-data/repositories Hooks: /opt/gitlab/embedded/service/gitlab-shell/hooks Git: /opt/gitlab/embedded/bin/git
Results of GitLab application Check
Expand for output related to the GitLab application check
Checking GitLab Shell ...
GitLab Shell version >= 7.1.2 ? ... OK (7.1.2) Repo base directory exists? default... yes Repo storage directories are symlinks? default... no Repo paths owned by git:root, or git:git? default... yes Repo paths access is drwxrws---? default... yes hooks directories in repos are links: ... 15/3 ... ok 15/5 ... ok 15/7 ... ok 15/8 ... ok 40/9 ... ok 25/14 ... ok 51/21 ... ok 51/22 ... ok 51/23 ... ok 51/24 ... ok 18/26 ... ok 51/27 ... ok 51/28 ... ok 54/30 ... ok 18/31 ... ok 18/33 ... ok 17/35 ... ok 51/36 ... ok 15/37 ... ok 36/38 ... repository is empty 16/40 ... ok 16/41 ... ok 16/42 ... ok 16/43 ... ok 16/44 ... ok 16/45 ... ok 16/46 ... ok 16/47 ... ok 18/49 ... ok 59/50 ... ok 15/51 ... ok 18/52 ... ok 56/54 ... ok 15/55 ... ok 15/59 ... ok 15/60 ... ok 15/62 ... repository is empty 59/64 ... ok 80/65 ... ok 15/66 ... ok 16/67 ... ok 18/68 ... ok 15/70 ... ok 82/71 ... ok 69/72 ... ok 82/73 ... ok 89/74 ... ok 15/75 ... ok 16/76 ... ok 16/77 ... ok 97/78 ... ok 15/79 ... ok 64/80 ... ok 64/81 ... ok 82/83 ... ok 15/85 ... ok 97/89 ... ok 15/91 ... ok 15/92 ... ok 29/93 ... ok 97/94 ... repository is empty 97/95 ... ok 97/96 ... ok 15/97 ... ok 15/98 ... ok 93/99 ... ok 50/100 ... ok 102/101 ... repository is empty 97/102 ... ok 97/103 ... ok 97/104 ... ok 97/105 ... ok 97/106 ... ok 97/107 ... ok 97/108 ... ok 97/109 ... ok 97/110 ... ok 97/111 ... ok 97/112 ... ok 97/113 ... ok 97/114 ... ok 15/115 ... ok Running /opt/gitlab/embedded/service/gitlab-shell/bin/check Check GitLab API access: OK Redis available via internal API: OK
Access to /var/opt/gitlab/.ssh/authorized_keys: OK gitlab-shell self-check successful
Checking GitLab Shell ... Finished
Checking Sidekiq ...
Running? ... yes Number of Sidekiq processes ... 1
Checking Sidekiq ... Finished
Reply by email is disabled in config/gitlab.yml Checking LDAP ...
Server: ldapmain LDAP authentication... Success LDAP users with access to your GitLab server (only showing the first 100 results) --redacted--
Checking LDAP ... Finished
Checking GitLab ...
Git configured correctly? ... yes Database config exists? ... yes All migrations up? ... yes Database contains orphaned GroupMembers? ... no GitLab config exists? ... yes GitLab config up to date? ... yes Log directory writable? ... yes Tmp directory writable? ... yes Uploads directory exists? ... yes Uploads directory has correct permissions? ... yes Uploads directory tmp has correct permissions? ... yes Init script exists? ... skipped (omnibus-gitlab has no init script) Init script up-to-date? ... skipped (omnibus-gitlab has no init script) Projects have namespace: ... 15/3 ... yes 15/5 ... yes 15/7 ... yes 15/8 ... yes 40/9 ... yes 25/14 ... yes 51/21 ... yes 51/22 ... yes 51/23 ... yes 51/24 ... yes 18/26 ... yes 51/27 ... yes 51/28 ... yes 54/30 ... yes 18/31 ... yes 18/33 ... yes 17/35 ... yes 51/36 ... yes 15/37 ... yes 36/38 ... yes 16/40 ... yes 16/41 ... yes 16/42 ... yes 16/43 ... yes 16/44 ... yes 16/45 ... yes 16/46 ... yes 16/47 ... yes 18/49 ... yes 59/50 ... yes 15/51 ... yes 18/52 ... yes 56/54 ... yes 15/55 ... yes 15/59 ... yes 15/60 ... yes 15/62 ... yes 59/64 ... yes 80/65 ... yes 15/66 ... yes 16/67 ... yes 18/68 ... yes 15/70 ... yes 82/71 ... yes 69/72 ... yes 82/73 ... yes 89/74 ... yes 15/75 ... yes 16/76 ... yes 16/77 ... yes 97/78 ... yes 15/79 ... yes 64/80 ... yes 64/81 ... yes 82/83 ... yes 15/85 ... yes 97/89 ... yes 15/91 ... yes 15/92 ... yes 29/93 ... yes 97/94 ... yes 97/95 ... yes 97/96 ... yes 15/97 ... yes 15/98 ... yes 93/99 ... yes 50/100 ... yes 102/101 ... yes 97/102 ... yes 97/103 ... yes 97/104 ... yes 97/105 ... yes 97/106 ... yes 97/107 ... yes 97/108 ... yes 97/109 ... yes 97/110 ... yes 97/111 ... yes 97/112 ... yes 97/113 ... yes 97/114 ... yes 15/115 ... yes Redis version >= 2.8.0? ... yes Ruby version >= 2.3.5 ? ... yes (2.3.7) Git version >= 2.9.5 ? ... yes (2.16.3) Git user has default SSH configuration? ... yes Active users: ... 86
Checking GitLab ... Finished