Skip to content

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

  1. Create project with no repo (unknown how to repo this). Project UI will show

image

Admin UI will show on /admin/projects/xx/xxx

image

  1. Run POST /projects/:project_id/repository_storage_moves

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

  1. Click Create empty repository
  2. Do move again
Edited by Ben Bodenmiller