Project Repository Moves no longer appear to work due to not found errors
Summary
When trying to move projects from one repository storage to another on our test reference environments, in this case separate Gitaly nodes, the process failed with the following error:
rpc error: code = Internal desc = FetchInternalRemote: remote default branch: rpc error: code = InvalidArgument desc = Storage can not be found by name 'default'
After reviewing the docs we did notice we were using the now deprecated gitaly['storage']
config and switch it over to git_data_dirs
but the issue remained.
However after changing the config to contain the full list of Gitaly paths across all nodes as well as their paths (which was suggested on a support issue) the error changed to the following:
rpc error: code = Internal desc = FetchInternalRemote: remote default branch: rpc error: code = NotFound desc = GetRepoPath: not a git repository
After investigating some more this appears to be a Gitaly related issue as it's the target Gitaly server specifically throwing the error. Transfers were attempted with the old Project API and the new Project repository storage move API.
Steps to reproduce
- Set up an environment with 2 separate Gitaly nodes, configuring them normally as per the docs.
- Import a project into one of the Gitaly nodes as normal
- After import has finished attempt to transfer the project's repository data to the other Gitaly node. Notice that it will fail with one of the above errors.
What is the current bug behavior?
Project transfers fail.
What is the expected correct behavior?
Project transfers succeed.