{"record":{"id":"0d3fe4957e44e216","repo":"phacility/phabricator","slug":"this-object-does-not-support-builds-with-buildkite","errorCode":null,"errorMessage":"This object does not support builds with Buildkite.","messagePattern":"This object does not support builds with Buildkite\\.","errorType":"exception","errorClass":"Exception","httpStatus":null,"severity":"error","filePath":"src/applications/harbormaster/step/HarbormasterBuildkiteBuildStepImplementation.php","lineNumber":84,"sourceCode":"    ,\n    $hook_uri);\n  }\n\n  public function execute(\n    HarbormasterBuild $build,\n    HarbormasterBuildTarget $build_target) {\n    $viewer = PhabricatorUser::getOmnipotentUser();\n\n    if (PhabricatorEnv::getEnvConfig('phabricator.silent')) {\n      $this->logSilencedCall($build, $build_target, pht('Buildkite'));\n      throw new HarbormasterBuildFailureException();\n    }\n\n    $buildable = $build->getBuildable();\n\n    $object = $buildable->getBuildableObject();\n    if (!($object instanceof HarbormasterBuildkiteBuildableInterface)) {\n      throw new Exception(\n        pht('This object does not support builds with Buildkite.'));\n    }\n\n    $organization = $this->getSetting('organization');\n    $pipeline = $this->getSetting('pipeline');\n\n    $uri = urisprintf(\n      'https://api.buildkite.com/v2/organizations/%s/pipelines/%s/builds',\n      $organization,\n      $pipeline);\n\n    $data_structure = array(\n      'commit' => $object->getBuildkiteCommit(),\n      'branch' => $object->getBuildkiteBranch(),\n      'message' => pht(\n        'Harbormaster Build %s (\"%s\") for %s',\n        $build->getID(),\n        $build->getName(),","sourceCodeStart":66,"sourceCodeEnd":102,"githubUrl":"https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/src/applications/harbormaster/step/HarbormasterBuildkiteBuildStepImplementation.php#L66-L102","documentation":"The Buildkite build step (HarbormasterBuildkiteBuildStepImplementation::execute) requires the buildable's underlying object to implement HarbormasterBuildkiteBuildableInterface, which is how the step obtains Buildkite wiring from the object. If the object being built (for example a custom or non-repository buildable) lacks the interface, the step throws during build execution and the target fails.","triggerScenarios":"Attaching a Buildkite build step to a build plan whose buildable object does not implement HarbormasterBuildkiteBuildableInterface (e.g. a custom application's buildable); building an object type that was never designed for Buildkite.","commonSituations":"Copy-pasting a CI plan from a repository build to plans for other object types; custom applications exposing buildable objects without implementing the CI interfaces.","solutions":["Only run Buildkite steps against Diffusion repositories, which implement the interface","Remove the Buildkite step from plans that build other kinds of objects","If you own the buildable class, implement HarbormasterBuildkiteBuildableInterface on it so the step can read its Buildkite metadata"],"exampleFix":"// before: Buildkite step attached to a plan building a custom object\n// -> throws at execute time\n// after: either (a) attach Buildkite steps only to repository builds, or\n// (b) implement the interface on the buildable object:\nclass MyBuildableObject implements HarbormasterBuildkiteBuildableInterface {\n  // ...implement the interface methods...\n}","handlingStrategy":"type-guard","validationCode":"$object = $build->getBuildable()->getBuildableObject();\nif (!($object instanceof HarbormasterBuildkiteBuildableInterface)) {\n  // fail fast with a clear message; do not attach this step to such plans\n}","typeGuard":"function supportsBuildkiteBuilds(HarbormasterBuild $build) {\n  return ($build->getBuildable()->getBuildableObject()\n    instanceof HarbormasterBuildkiteBuildableInterface);\n}","tryCatchPattern":null,"preventionTips":["Gate Buildkite steps to plans that build Diffusion repositories","When adding custom buildable objects, decide up front which CI interfaces they implement"],"tags":["harbormaster","phabricator","buildkite","build-step","interface"],"backgroundTag":"missing-interface-implementation","analyzedSha":"5720a38cfe95b00ca4be5016dd0d2f3195f4fa04","analyzedAt":"2026-08-21T05:07:25.672Z","schemaVersion":2},"datasetVersion":"2026-08-21T11:28:35.574Z"}