Clean up webpack integration settings
What does this MR do?
When we were utilizing the webpack-rails
gem, we had to maintain two separate blocks of settings (one defined by the gem and set within application.rb
and the other found within gitlab.yml
). These were used interchangably in confusing ways in order to influence the default behavior of the gem while doing things like proxying the webpack output through rails middleware.
Now that we have integrated the remainder of the webpack-rails
gem code we were relying on into gitlab itself, we can remove these redundant settings and workarounds and simplify everything.
This branch removes the settings within application.rb
and updates all webpack helper files to reference the settings in gitlab.yml
(with defaults defined in 1_settings.rb
) instead.
Other changes:
- removes the need for a separate
manifest_host
andmanifest_port
config since we no longer overridehost
andport
withinstatic_files.rb
- adds the ability to set whether webpack_dev_server is running via https
Part of #213130 (closed) and gitlab-org/gitlab#247049
Tests to ensure everything is working correctly:
-
Ensure webpack works as expected in development both with dev_server enabled and disabled -
Ensure that webpack works as expected while running RSpec tests with dev_server enabled -
Ensure webpack can be run with SSL enabled without breaking the rails proxy middleware
Screenshots
N/A
Does this MR meet the acceptance criteria?
Conformity
-
Changelog entry -
Documentation (if required) -
Code review guidelines -
Merge request performance guidelines -
Style guides -
Database guides -
Separation of EE specific content
Availability and Testing
-
Review and add/update tests for this feature/bug. Consider all test levels. See the Test Planning Process. -
Tested in all supported browsers -
Informed Infrastructure department of a default or new setting change, if applicable per definition of done
Security
If this MR contains changes to processing or storing of credentials or tokens, authorization and authentication methods and other items described in the security review guidelines:
-
Label as security and @ mention @gitlab-com/gl-security/appsec
-
The MR includes necessary changes to maintain consistency between UI, API, email, or other methods -
Security reports checked/validated by a reviewer from the AppSec team