Currently, we have several "support" applications (like Tokens, Subscribers, Flags, and Projects) that provide features to other applications.
Another possible support application is some kind of "API Utilities", either as part of Conduit or as a separate application.
Use cases are light on this, but I think it generally has fairly good properties conceptually if we can find enough things to motivate it. The primary use case today is something like this:
- I want to create a task for each <external object> in <some bug tracker, repository, etc>.
There's no convenient way to:
- Guarantee each external object gets exactly one internal object.
- Look up the internal object.
- Prevent users from messing up the relationship.
- Do all of this in a light, ad-hoc way without custom code (no Doorkeeper, etc).
If we had some utilities for doing general locking/leasing/labeling, this might look like:
- util.search for the object with label "X".
- If it exists, great. Update it or whatever.
- If it doesn't exist, create it, then util.label it (or util.atomic-label-and-publish it or whatever).
You can do this to some degree with custom fields or task titles, but they don't enforce uniqueness and users can edit them. You can disable that with editengine, but then you're configuring a bunch of stuff in weird different ways. It's also nice to be able to build this kind of synchronization logic purely into an external script without needing to rely on a particular custom field or editengine configuration. And this won't work for every application since not everything has full CustomField/EditEngine support.
In particular, useful primitives might include:
- The ability to label an object with a unique label so that you can build an ad-hoc relationship between "external object X" and some Phabricator object.
- The ability to lock or lease a label (or atomically publish an object) so if two copies of your script run at the same time they don't collide mid-flight.
A generic "Publish" capability for objects would grow out of T10215. See also T11440 for the manual version of this.