We’ve seen a deadlock in CI here https://gitlab.com/mkozono/gitlab-ce/builds/15644492#down-build-trace. This commit should not fix that particular failure, but perhaps it will avoid others.
* Don’t call delete_conflicting_redirects after update if the path wasn’t changed
* Rename descendants without using recursion again, so we can run delete_conflicting_redirects exactly once.
It was possible for the `routes.name` field to be `NULL`, causing
`name_was` to be `nil` after a rename, resulting a bad first argument to
`sub` when attempting to rename descendants. This change adds a
condition to make sure `name_was` is present before attempting the
descendant update.
Given group `gitlab` and `gitlab-org` exists. When rename `gitlab` it
will rename `gitlab-org` group route too. This commit fixes it
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
* add parent_id field to namespaces table to store relation with nested groups
* create routes table to keep information about full path of every group and project
* project/group lookup by full path from routes table
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>