Fix issue with Gitlab::CurrentSettings and autoload/spring system
What does this MR do?
Adds a require_dependency Rails.root.join('lib/gitlab/current_settings')
to the config/application.rb
in order to ensure it's loaded before a variety of helper modules are loaded and could cause Unable to autoload constant
. See https://gitlab.com/gitlab-org/gitlab-ee/issues/4842 for more details.
Are there points in the code the reviewer needs to double check?
Why was this MR needed?
This fixes an issue where the Rails autoload system would throw various Unable to autoload constant
errors (such as Unable to autoload constant EE::ProjectsHelper
) when using the autoload system (such with spring
or reload!
in the rails console.
This error was specifically ocurring in the EE code, however, it's seems reasonable to place the fix in CE as a general innoculation.
Screenshots (if relevant)
Does this MR meet the acceptance criteria?
- [-] Changelog entry added, if necessary
- [-] Documentation created/updated
- [-] API support added
- [-] Tests added for this feature/bug
- Review
- [-] Has been reviewed by UX
- [-] Has been reviewed by Frontend
-
Has been reviewed by Backend - [-] Has been reviewed by Database
-
Conform by the merge request performance guides -
Conform by the style guides -
Squashed related commits together - [-] Internationalization required/considered
-
End-to-end tests pass ( package-qa
manual pipeline job)
What are the relevant issue numbers?
Edited by Brett Walker