Add messages to warn and stop users when attempting to change the path of projects with NPM packages
The following discussion from !13986 (merged) should be addressed:
-
@engwan started a discussion: (+2 comments) Thanks @sabrams. Left more comments.
Also a question: What happens to the packages when project / group paths are renamed?
Problem
If a user renames a project or group path when the project contains NPM packages, the NPM functionality will fail, npm publish
and npm install
will no longer work because the name is validated and searched for based on the project path.
Once #9960 (closed) is resolved and !13986 (merged) is merged, the npm install
functionality will work because packages will be found based on package name, not based on project path. However there will be problems with npm publish
if the root namespace (i.e. foo
in gitlab.com/foo/my-subgroup/my-project
) is changed. This can occur if foo
is a top level group and the path to that group is updated. It can also occur if my-subgroup
or my-project
is transferred out of foo
.
Proposal
When a user attempts to change the path to a project that contains a container registry with tags, the path does not update, and the user sees an error saying "Cannot rename project because it contains container registry tags!".
We should implement a similar blocking error if a user attempts to rename a top level group (the root namespace) that contains NPM packages, as well as if a user attempts to move any project or subgroup that contains NPM packages.
Other considerations
All other packages registries (i.e. Maven) should be considered as well.