{"record":{"id":"439d9b01ca54f355","repo":"phacility/phabricator","slug":"build-plan-s-does-not-exist","errorCode":null,"errorMessage":"Build plan \"%s\" does not exist.","messagePattern":"Build plan \"(.+?)\" does not exist\\.","errorType":"console","errorClass":"PhutilArgumentUsageException","httpStatus":null,"severity":"warning","filePath":"src/applications/harbormaster/management/HarbormasterManagementBuildWorkflow.php","lineNumber":69,"sourceCode":"    if (!($buildable instanceof HarbormasterBuildableInterface)) {\n      throw new PhutilArgumentUsageException(\n        pht('Object \"%s\" is not a buildable!', $name));\n    }\n\n    $plan_id = $args->getArg('plan');\n    if (!$plan_id) {\n      throw new PhutilArgumentUsageException(\n        pht(\n          'Use %s to specify a build plan to run.',\n          '--plan'));\n    }\n\n    $plan = id(new HarbormasterBuildPlanQuery())\n      ->setViewer($viewer)\n      ->withIDs(array($plan_id))\n      ->executeOne();\n    if (!$plan) {\n      throw new PhutilArgumentUsageException(\n        pht('Build plan \"%s\" does not exist.', $plan_id));\n    }\n\n    if (!$plan->canRunManually()) {\n      throw new PhutilArgumentUsageException(\n        pht('This build plan can not be run manually.'));\n    }\n\n    $console = PhutilConsole::getConsole();\n\n    $buildable = HarbormasterBuildable::initializeNewBuildable($viewer)\n      ->setIsManualBuildable(true)\n      ->setBuildablePHID($buildable->getHarbormasterBuildablePHID())\n      ->setContainerPHID($buildable->getHarbormasterContainerPHID())\n      ->save();\n\n    $buildable->sendMessage(\n      $viewer,","sourceCodeStart":51,"sourceCodeEnd":87,"githubUrl":"https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/src/applications/harbormaster/management/HarbormasterManagementBuildWorkflow.php#L51-L87","documentation":"The --plan value passed to `harbormaster build` was used to load a HarbormasterBuildPlan by ID and no plan with that ID exists. The value must be the numeric plan ID (from the plan's URI), not the plan name and not a PHID.","triggerScenarios":"Passing a plan name or monogram instead of the numeric ID; a plan that was deleted; copy-pasting an ID from another install; leading zeros/whitespace corrupting the value.","commonSituations":"Assuming the plan name works; environments where plans were recreated with new IDs and scripts still reference old ones.","solutions":["Open Build > Build Plans in the UI and use the numeric ID from the plan URL (e.g. 5 from /harbormaster/plan/5/).","Confirm the plan still exists and was not deleted.","Quote/trim the value in scripts to avoid stray characters."],"exampleFix":"# before\n./bin/phabricator harbormaster build --plan 'Lint and Test' D123\n\n# after\n./bin/phabricator harbormaster build --plan 5 D123","handlingStrategy":"validation","validationCode":"$plan = id(new HarbormasterBuildPlanQuery())\n  ->setViewer($viewer)\n  ->withIDs(array((int)$plan_id))\n  ->executeOne();\nif (!$plan) { /* wrong ID; look it up in the UI before running */ }","typeGuard":"function planIdExists($viewer, $id) {\n  return (bool)id(new HarbormasterBuildPlanQuery())\n    ->setViewer($viewer)\n    ->withIDs(array((int)$id))\n    ->executeOne();\n}","tryCatchPattern":null,"preventionTips":["Use the numeric ID from the plan URL (/harbormaster/plan/N/), never the plan name.","Re-check plan IDs in scripts after plan deletions/recreations."],"tags":["harbormaster","cli","usage-error","build-plan","entity-not-found"],"backgroundTag":"entity-not-found-by-id","analyzedSha":"5720a38cfe95b00ca4be5016dd0d2f3195f4fa04","analyzedAt":"2026-08-21T05:07:25.672Z","schemaVersion":2},"datasetVersion":"2026-08-21T11:28:35.574Z"}