Improve error handling when namespace cannot be moved
What does this MR do?
@stanhu This MR slightly improves error handling when namespace cannot be renamed. It does not address https://gitlab.com/gitlab-org/gitlab-ee/issues/4553 fully as that would require a global refactoring and it's not strictly needed as the error can be found but it's not really easy.
Geo::HashedStorageMigrationService
calls Geo::MoveRepositoryService.new(project, old_disk_path, new_disk_path).execute
which never raises an exception, it just returns boolean response. It's used in two places in the GitLab's codebase. Inside it calls gitlab_shell.mv_repository
which also only returns boolean response. gitlab_shell.mv_repository
is used in 17 places so if we need to change it, we need to refactor all those places. It's worth to say that lib/gitlab/shell.rb
itself is not very consistent in a way it handles errors. Sometimes it just returns boolean status with no logs, sometimes it returns boolean + writes logs and sometimes it just raises errors. So if we touch it, we probably need to make other methods consistent too. Let me know what you think.
/cc @mkozono
What are the relevant issue numbers?
Does this MR meet the acceptance criteria?
-
Changelog entry added, if necessary -
Documentation created/updated -
Tests added for this feature/bug -
Tested in all supported browsers -
Conforms to the code review guidelines -
Conforms to the merge request performance guidelines -
Conforms to the style guides -
Conforms to the database guides -
Link to e2e tests MR added if this MR has Requires e2e tests label. See the Test Planning Process. -
EE specific content should be in the top level /ee
folder -
For a paid feature, have we considered GitLab.com plans, how it works for groups, and is there a design for promoting it to users who aren't on the correct plan? -
Security reports checked/validated by reviewer
Closes #4553 (closed)