Skip to content

Avoid code duplication in CE&EE for projects services initialization

Olena Horal-Koretska requested to merge 213233_remove_code_duplications into master

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

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

References #213233 (closed)

Edited by Olena Horal-Koretska

Merge request reports