When triggering a build in an external system like Jenkins, the external system needs to be able to check out a working copy of the changes (say, D123). There are broadly four ways to do this:
- Check out the origin, then arc patch D123 the user's changes.
- Fetch some "real" branch which arc pushed to earlier (as a side effect of arc diff).
- Fetch a virtual branch which Phabricator provides.
- Phabricator builds the working copy and tells the external system where it is.
Implementations in the wild all use (1) or (2) today. These are both severely limited, fragile, complex, hard to configure, require needless dependencies, confusing, etc. For (1), you need arc on the build nodes, among many other problems. For (2), you pollute your remote with internal D123 branches or have to come up with some non-polluting side-band channel.
We should attempt to support (3).
(4) is Drydock, and lets us do a lot of other stuff, but it depends on some other handoff mechanism existing. So the ideal path forward here is building (3), then building Drydock on top of it later.
Generally, path forward is:
- Evaluate (3).
- Hopefully we can do it reasonably.
- If we can't, figure out what the least-bad non-virtual-ref approach is.