Page MenuHomePhabricator

Make objects implementing BuildableInterface produce a BuildableEngine

Authored by epriestley on Apr 3 2018, 11:46 AM.
Referenced Files
Unknown Object (File)
Tue, May 24, 4:11 AM
Restricted Owners Package



Ref T13110. Currently, build status is published the same way for every Buildable by the BuildEngine.

I want to change this to delegate publishing to each Buildable, particularly so that Differential may use more detailed rules for handling builds and drafts.

Rather than add additional methods to the existing BuildableInterface, add an engine generator method instead. This is a pattern which has seen more use recently (e.g., in Ferret) and lets us pay a little more upfront to pull complex pieces of logic out of the main class and let them use inheritence more easily. If we had Traits that might cover this to some degree.

I'd expect to eventually reduce the size of BuildableInterface and move the CircleCI and BuildKite interfaces so that the BuildableEngine implements them instead of the main object.

Here, this new engine does nothing and is never instantiated. In upcoming changes, publishing logic will move into it so that Differential can handle publishing differently.

Test Plan

Ran arc liberate, loaded pages, grepped for BuildableInterface.

Diff Detail

rP Phabricator
Lint Not Applicable
Tests Not Applicable