{"record":{"id":"4f74b3d355aa2052","repo":"phacility/phabricator","slug":"this-blueprint-s-does-not-define-any-almanac","errorCode":null,"errorMessage":"This blueprint (\"%s\") does not define any Almanac Service PHIDs.","messagePattern":"This blueprint \\(\"(.+?)\"\\) does not define any Almanac Service PHIDs\\.","errorType":"exception","errorClass":"Exception","httpStatus":null,"severity":"error","filePath":"src/applications/drydock/blueprint/DrydockAlmanacServiceHostBlueprintImplementation.php","lineNumber":214,"sourceCode":"        ),\n        'required' => true,\n      ),\n      'credentialPHID' => array(\n        'name' => pht('Credentials'),\n        'type' => 'credential',\n        'credential.provides' =>\n          PassphraseSSHPrivateKeyCredentialType::PROVIDES_TYPE,\n        'credential.type' =>\n          PassphraseSSHPrivateKeyTextCredentialType::CREDENTIAL_TYPE,\n      ),\n    );\n  }\n\n  private function loadServices(DrydockBlueprint $blueprint) {\n    if (!$this->services) {\n      $service_phids = $blueprint->getFieldValue('almanacServicePHIDs');\n      if (!$service_phids) {\n        throw new Exception(\n          pht(\n            'This blueprint (\"%s\") does not define any Almanac Service PHIDs.',\n            $blueprint->getBlueprintName()));\n      }\n\n      $viewer = $this->getViewer();\n      $services = id(new AlmanacServiceQuery())\n        ->setViewer($viewer)\n        ->withPHIDs($service_phids)\n        ->withServiceTypes($this->getAlmanacServiceTypes())\n        ->needActiveBindings(true)\n        ->execute();\n      $services = mpull($services, null, 'getPHID');\n\n      if (count($services) != count($service_phids)) {\n        $missing_phids = array_diff($service_phids, array_keys($services));\n        throw new Exception(\n          pht(","sourceCodeStart":196,"sourceCodeEnd":232,"githubUrl":"https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/src/applications/drydock/blueprint/DrydockAlmanacServiceHostBlueprintImplementation.php#L196-L232","documentation":"DrydockAlmanacServiceHostBlueprintImplementation::loadServices() reads the blueprint's `almanacServicePHIDs` field to know which Almanac services provide hosts. When the field is empty it throws this Exception before any query runs. It is a blueprint configuration error: the blueprint was created without pointing it at any Almanac service.","triggerScenarios":"A Drydock host blueprint of this type whose `almanacServicePHIDs` field is null or an empty list attempts to allocate a resource (or otherwise call loadServices()).","commonSituations":"Creating the blueprint from the UI/CLI and skipping the services field; a blueprint created by script where the field key was misspelled so it saved empty; services were cleared during reconfiguration while leases were still being requested.","solutions":["Edit the blueprint and set `almanacServicePHIDs` to one or more Almanac service PHIDs","Create the Almanac services first (with active bindings of the right service type) if none exist","Copy the PHIDs exactly from the Almanac service detail pages (PHID form, e.g. HSVC...)"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"$phids = $blueprint->getFieldValue('almanacServicePHIDs');\nif (!$phids) {\n  // Do not enable/lease against this blueprint until services are configured.\n  throw new Exception('Blueprint lacks almanacServicePHIDs');\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Create and bind Almanac services first, then configure the blueprint with their PHIDs","When scripting blueprint creation, assert the services field saved non-empty","Copy service PHIDs from the Almanac service detail pages to avoid typos"],"tags":["phabricator","drydock","almanac","blueprint","configuration"],"backgroundTag":"missing-required-configuration","analyzedSha":"5720a38cfe95b00ca4be5016dd0d2f3195f4fa04","analyzedAt":"2026-08-21T05:07:25.672Z","schemaVersion":2},"datasetVersion":"2026-08-21T11:28:35.574Z"}