Limit scope of init_create_cluster module
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
-
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
Closes #219265 (closed)