Handle new namespace name rules
Following changes to allowed namespaces in !111017 (merged) (which are currently controlled by a feature flag), any Direct Transfer imports that include older namespaces with now invalid names will fail. We need to work out how to handle these changes.
The problem is with GitLab Direct Transfer. Currently, the user only chooses the top-level group's path, and the paths of subgroups and projects are copied from the source. Therefore, for the top-level group's path, the user will have to provide a
path
that is valid. However, because Direct Transfer copies the path of the subgroups and projects, any invalid path will prevent the nested resource from being created during the migration.So, to fix the problem, GitLab Direct Transfer has to convert any invalid path into valid paths. see: #390954 (comment 1296760045)