Page MenuHomePhabricator

Creating repository via repository.create API does not get uri indexed
Closed, DuplicatePublic

Description

Creating repository via Conduit API method repository.create does not spawn PhabricatorSearchWorker task which responsible for adding record to uri *_repository.repository_index table.
Because of that, it is impossible retrieve repositories by remoteURIs via repository.query API method.

Creating repository via Diffusion form - does.

Event Timeline

I'm just going to merge this into T10337, which discusses providing modern endpoints. repository.create is a broken mess and we tend to replace it rather than fixing it (it can't reasonably be fixed without breaking the API, anyway, so we'd end up with a new endpoint in effect, regardless). The new diffusion.edit will fix this and the many other problems with repository.create.

T10699 is a similar recent discussion of another issue, and describes some possible workarounds until we fix the API.

Generally, making any transaction-oriented edit to the repository should trigger a reindex. I think there's no convenient way to do that via the API today, although you can via the CLI with bin/repository edit.