Avoid code duplication in CE&EE for projects services initialization
What does this MR do?
Addresses the following discussion !28196 (comment 315861587)
- Have CE expose a module for the "base setup", and have EE import this and call it
- Use the
ee_else_ce
webpack alias in the CE module
So CE file app/assets/javascripts/pages/projects/services/edit/index.js
implements projects services initialization. The difference is only in initPrometheusMetrics
which is implemented in ee_else_ce/pages/projects/services/edit/init_prometheus_metrics.js
(where ee_else_ce
path resolves depending whether it is CE or EE
ee/app/assets/javascripts/pages/projects/services/edit/index.js
just imports services initialization from CE folder
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
References #213233 (closed)
Edited by Olena Horal-Koretska