{"record":{"id":"9ca3d45603c223f9","repo":"phacility/phabricator","slug":"no-known-blueprint-class-can-ever-allocate-the-spe","errorCode":null,"errorMessage":"No known blueprint class can ever allocate the specified lease. Check that the resource type is spelled correctly.","messagePattern":"No known blueprint class can ever allocate the specified lease\\. Check that the resource type is spelled correctly\\.","errorType":"console","errorClass":"PhutilArgumentUsageException","httpStatus":null,"severity":"error","filePath":"src/applications/drydock/management/DrydockManagementLeaseWorkflow.php","lineNumber":321,"sourceCode":"      }\n\n      $seen[$blueprint_phid] = true;\n    }\n\n    return mpull($map, null, 'getPHID');\n  }\n\n  private function newAllowedBlueprintPHIDs(\n    DrydockLease $lease,\n    array $filter_blueprints) {\n    assert_instances_of($filter_blueprints, 'DrydockBlueprint');\n\n    $viewer = $this->getViewer();\n\n    $impls = DrydockBlueprintImplementation::getAllForAllocatingLease($lease);\n\n    if (!$impls) {\n      throw new PhutilArgumentUsageException(\n        pht(\n          'No known blueprint class can ever allocate the specified '.\n          'lease. Check that the resource type is spelled correctly.'));\n    }\n\n    $classes = array_keys($impls);\n\n    $blueprints = id(new DrydockBlueprintQuery())\n      ->setViewer($viewer)\n      ->withBlueprintClasses($classes)\n      ->withDisabled(false)\n      ->execute();\n\n    if (!$blueprints) {\n      throw new PhutilArgumentUsageException(\n        pht(\n          'No enabled blueprints exist with a blueprint class that can '.\n          'plausibly allocate resources to satisfy the requested lease.'));","sourceCodeStart":303,"sourceCodeEnd":339,"githubUrl":"https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/src/applications/drydock/management/DrydockManagementLeaseWorkflow.php#L303-L339","documentation":"A PhutilArgumentUsageException from `bin/drydock lease` raised before any lease is acquired: DrydockBlueprintImplementation::getAllForAllocatingLease($lease) returned an empty set, meaning no registered blueprint implementation class in the entire install declares that it could ever allocate the requested resource type (with the given attributes). The most common cause is a misspelled --type value; it is a static capability check, independent of whether blueprint instances are configured or enabled.","triggerScenarios":"`bin/drydock lease --type hsot` (typo), `--type working-copy` on an install whose working-copy implementation is not available, or lease attributes that no implementation's canAllocateLease() accepts.","commonSituations":"Typos in resource type strings in scripts; requesting a custom resource type whose blueprint implementation class is not enabled in the install; attribute shape changes after upgrading.","solutions":["Fix the resource type spelling: the standard types are 'host' and 'working-copy' — verify with the blueprints you have and their implementation classes.","If a custom type is intended, make sure its DrydockBlueprintImplementation subclass is present, final, registered, and returned by getAllBlueprintImplementations().","Check the lease attributes (from --attributes) against what the implementation's canAllocateLease() expects."],"exampleFix":"# before\nbin/drydock lease --type hsot\n\n# after\nbin/drydock lease --type host","handlingStrategy":"validation","validationCode":"$probe = id(new DrydockLease())->setResourceType($resource_type);\nif ($attributes) {\n  $probe->setAttributes($attributes);\n}\n$impls = DrydockBlueprintImplementation::getAllForAllocatingLease($probe);\nif (!$impls) {\n  throw new InvalidArgumentException(\n    \"No blueprint implementation can ever allocate '{$resource_type}'; \".\n    'check the type spelling and attributes.');\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Define resource type strings as constants shared by producers and the lease scripts.","Validate --type against registered implementations before invoking `bin/drydock lease`."],"tags":["drydock","phabricator","cli","resource-type","blueprint","capability"],"backgroundTag":"no-capable-provider","analyzedSha":"5720a38cfe95b00ca4be5016dd0d2f3195f4fa04","analyzedAt":"2026-08-21T05:07:25.672Z","schemaVersion":2},"datasetVersion":"2026-08-21T11:28:35.574Z"}