Skip to content

Clean up webpack integration settings

Mike Greiling requested to merge mg-fix-webpack-ssl-issues into master

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 and manifest_port config since we no longer override host and port within static_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

Availability and Testing

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
Edited by Mike Greiling

Merge request reports

Loading