Fix local RSpec tests due to bug in `webpack_bundle_tag`
What does this MR do?
The force_same_domain
argument added to webpack_bundle_tag
in gitlab-org/gitlab-ce!16459 inadvertently breaks our ability to run RSpec tests locally. In order for RSpec to communicate with webpack-dev-server
it needs to reference the hostname and port for the dev server rather than referencing an absolute path, and this change blocks that from happening.
In addition to this, the webpack_bundle_tag
implementation was taking in a force_same_domain
argument, but was subsequently ignoring it and always passing in true
. This effectively disables any CDN settings for webpack asset paths and breaks RSpec for every feature test run with webpack-dev-server.
This merge request fixes the latter bug, but we should also open a follow-up issue to clean up the overall implementation of this force_same_domain
argument.
/cc @ClemMakesApps @jschatz1 @jivanvl @rspeicher @timzallmann
Are there points in the code the reviewer needs to double check?
Why was this MR needed?
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?
Related: #42454 (moved), Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/42368