Page MenuHomePhabricator

Creating an imported repository via Conduit results in filesystem error
Closed, DuplicatePublic

Description

This issue may only affect Phacility-hosted instances, which is what I'm using.

I'm looking to create an imported repository (basically, the same thing as the "Import an Existing External Repository" option in Create or Import Repository in Diffusion) via Conduit. I'm not seeing a clear way to do that via the Conduit API (guessing tha repository.create is the right call to be using).

When I try, I get an error like File system entity /core//repo/orgname/REPONAME/' does not exist.` It also looks like, for manually created repositories, the storage service is set to "Restricted Almanac Service", while repos created via Conduit are set to "Local".

Event Timeline

ndhoule renamed this task from Create a hosted repository via Conduit to Creating a hosted repository via Conduit results in filesystem error.
ndhoule updated the task description. (Show Details)
ndhoule added projects: Conduit, Diffusion.
ndhoule added a subscriber: ndhoule.

FWIW, my intended use case is to consume GitHub's organizations feed and automatically mirror repositories in Phabricator.

(Ultimately I'd also like to be able to delete/deactivate repositories in Phabricator when deleted from GitHub (which I presume would need repository.deactivate or similar), but that's a separate ticket.)

This endpoint is very old and has a lot of problems, including not being cluster-aware. In the Phacility cluster, the web host and repository hosts are separated. repository.create can not create cluster-aware repositories.

It will be replaced by a standardized endpoint after T5873, but that probably won't happen until early next year. Particularly, it is blocked on T9132, which is likely to happen this year but is a lot of work.

There probably isn't a very reasonable way to do this until then.

Until T4245, you'd also need to generate a unique callsign for each repository, although this is generally tractable.

As a minor technical point, you're trying to create imported repositories (i.e., import repositories from GitHub), not hosted repositories, right? This endpoint can't create hosted repositories at all, AFAIK.

(After T8783, also slated for development at some point this year, we may also begin exploring imports from GitHub, although this is generally a featureset I'm not thrilled about -- see T3179 for some discussion -- and pull requests / issues are probably higher priorities than repositories.)

As a minor technical point, you're trying to create imported repositories (i.e., import repositories from GitHub), not hosted repositories, right? This endpoint can't create hosted repositories at all, AFAIK.

Ah yes, my mistake on wording—I am trying to create imported repositories.

ndhoule renamed this task from Creating a hosted repository via Conduit results in filesystem error to Creating an imported repository via Conduit results in filesystem error.Oct 21 2015, 5:02 PM
ndhoule updated the task description. (Show Details)
eadler added a project: Restricted Project.Jan 9 2016, 1:06 AM
eadler moved this task from Restricted Project Column to Restricted Project Column on the Restricted Project board.

I'm going to merge this into T10748, since that's now clearly the way forward.

Specifically, we're introducing a new endpoint (diffusion.repository.edit) which can create and edit repositories in a modern way, including cluster-awareness, and obsoleting the old endpoint (repository.create). The new endpoint has a limited set of capabilities today, but should be fully functional soon. T10748 has context, details, and progress.