Project repository storage moves API doesn't work if repository does not exist
Summary
POST /projects/:project_id/repository_storage_moves
fails if project repository does not exist.
Steps to reproduce
- Create project with no repo (unknown how to repo this). Project UI will show
Admin UI will show on /admin/projects/xx/xxx
What is the current bug behavior?
Check GET /project_repository_storage_moves
and see it failed
. Looking at logs we can see rpc error: code = NotFound desc = GetRepoPath: not a git repository '/path/to/repo/if/it/existed.git'
What is the expected correct behavior?
Should ignore that repo does not exist on disk and update database entry for storage name accordingly.
Possible fixes
Workaround
- Click
Create empty repository
- Do move again
Edited by Ben Bodenmiller