Skip to content

Limit scope of init_create_cluster module

Enrique Alcántara requested to merge 219265-move-init-create-cluster into master

What does this MR do?

It reduces the scope where the for the create cluster application module is imported. Before this change, we were importing this module in all project and group pages. After this change, the module is only imported in the cluster section for projects and groups.

Why?

The reason I imported init_create_cluster in the projects and groups entry point is that the create cluster feature has two endpoints: /[namespace]/-/clusters/new and /[namespace]/-/clusters/create.

When I imported init_create_cluster in a page file that targeted the new endpoint (/src/assets/javascripts/pages/projects/clusters/new/index.js), the module wouldn’t load for the /clusters/create endpoint. Hence, I decided to import the module in a common denominator entry point.

After looking at this again, I realize there is a common denominator entry point with a narrower endpoint: /src/assets/javascripts/pages/projects/clusters/index.js and /src/assets/javascripts/pages/groups/clusters/index.js.

In the case of the instance-level clusters, I think we don’t have that problem 🤔

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

Closes #219265 (closed)

Edited by Enrique Alcántara

Merge request reports