404 Tree Not Found when adding an empty repo
Sentry Issue: ARKINDEX-BACKEND-4N
GitlabHttpError: 404: 404 Tree Not Found
(1 additional frame(s) were not displayed)
...
File "gitlab/v4/objects.py", line 3271, in repository_tree
**kwargs)
File "__init__.py", line 577, in http_list
**kwargs))
File "__init__.py", line 686, in __init__
self._query(url, query_data, **kwargs)
File "__init__.py", line 691, in _query
**kwargs)
File "__init__.py", line 510, in http_request
response_body=result.content)
GitlabGetError: 404: 404 Tree Not Found
(10 additional frame(s) were not displayed)
...
File "arkindex/dataimport/api.py", line 549, in create
File "arkindex/dataimport/providers.py", line 215, in create_repo
File "arkindex/dataimport/providers.py", line 162, in get_repository_type
File "gitlab/cli.py", line 43, in wrapped_f
return f(*args, **kwargs)
File "gitlab/exceptions.py", line 253, in wrapped_f
raise error(e.error_message, e.response_code, e.response_body)
Creating a completely empty GitLab repository causes an HTTP 500 from a GitLab 404 because Arkindex tries to immediately start an import.