Initialising failing in master when gitlab.hosts unset

Introduced by !17711 (merged)

Review apps and the GitLab chart are throwing errors when trying to run migrations:

2019-10-03T16:02:46.187578225Z NoMethodError: undefined method `[]' for nil:NilClass
2019-10-03T16:02:46.187585841Z /srv/gitlab/config/light_settings.rb:25:in `host'
2019-10-03T16:02:46.187591995Z /srv/gitlab/config/light_settings.rb:11:in `com?'
2019-10-03T16:02:46.187597974Z /srv/gitlab/config/application.rb:66:in `<class:Application>'
2019-10-03T16:02:46.187605023Z /srv/gitlab/config/application.rb:14:in `<module:Gitlab>'
2019-10-03T16:02:46.187611373Z /srv/gitlab/config/application.rb:13:in `<top (required)>'

This is because these migrations have a very bare-bones gitlab.yml that does not include gitlab.host.

In our full settings initializer we default gitlab.host to localhost. We should also do that for the light_settings. https://gitlab.com/gitlab-org/gitlab/blob/2504a8ab01bc73d35c40000fdd67b8eae6f291a6/config/initializers/1_settings.rb#L164

Assignee Loading
Time tracking Loading