{"record":{"id":"ea8ab3c1b1a425e9","repo":"phacility/phabricator","slug":"no-active-drydock-blueprint-exists-which-can-ever","errorCode":null,"errorMessage":"No active Drydock blueprint exists which can ever allocate a resource for lease \"%s\".","messagePattern":"No active Drydock blueprint exists which can ever allocate a resource for lease \"(.+?)\"\\.","errorType":"exception","errorClass":"PhabricatorWorkerPermanentFailureException","httpStatus":null,"severity":"error","filePath":"src/applications/drydock/worker/DrydockLeaseUpdateWorker.php","lineNumber":182,"sourceCode":"/* -(  Drydock Allocator  )-------------------------------------------------- */\n\n\n  /**\n   * Find or build a resource which can satisfy a given lease request, then\n   * acquire the lease.\n   *\n   * @param DrydockLease Requested lease.\n   * @return void\n   * @task allocator\n   */\n  private function executeAllocator(DrydockLease $lease) {\n    $blueprints = $this->loadBlueprintsForAllocatingLease($lease);\n\n    // If we get nothing back, that means no blueprint is defined which can\n    // ever build the requested resource. This is a permanent failure, since\n    // we don't expect to succeed no matter how many times we try.\n    if (!$blueprints) {\n      throw new PhabricatorWorkerPermanentFailureException(\n        pht(\n          'No active Drydock blueprint exists which can ever allocate a '.\n          'resource for lease \"%s\".',\n          $lease->getPHID()));\n    }\n\n    // First, try to find a suitable open resource which we can acquire a new\n    // lease on.\n    $resources = $this->loadAcquirableResourcesForLease($blueprints, $lease);\n\n    list($free_resources, $used_resources) = $this->partitionResources(\n      $lease,\n      $resources);\n\n    $resource = $this->leaseAnyResource($lease, $free_resources);\n    if ($resource) {\n      return $resource;\n    }","sourceCodeStart":164,"sourceCodeEnd":200,"githubUrl":"https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/src/applications/drydock/worker/DrydockLeaseUpdateWorker.php#L164-L200","documentation":"DrydockLeaseUpdateWorker::executeAllocator() first asks loadBlueprintsForAllocatingLease() for every active blueprint whose implementation type matches and that reports it can ever satisfy the lease. An empty list is a PhabricatorWorkerPermanentFailureException: no amount of retrying will help, because the configuration cannot produce the requested resource. The lease's resource type literally has no willing provider.","triggerScenarios":"Acquiring a lease whose setResourceType() string matches no enabled blueprint implementation's getType(); the only matching blueprint is disabled or not yet active; the blueprint's canAllocateResourcesForLease() (or authorization checks) returning false for every candidate.","commonSituations":"Typo between the lease resource type (e.g. 'working-copy' vs 'workingcopy') and the blueprint type; blueprint disabled in the Drydock UI during maintenance; custom blueprint not enabled for the lease authorizing PHID; version change renaming a resource type.","solutions":["Check the lease's resource type string against the blueprint implementation's getType() and correct the mismatch.","Verify at least one matching blueprint exists and is enabled/active in Drydock, and that its implementation passes the can-allocate checks for this lease.","If the blueprint intentionally cannot serve this lease, fix its canAllocateResourcesForLease() logic or change what the lease requests.","Do not retry the task: as a permanent failure the queue will stop re-running it."],"exampleFix":"// before\n$lease = DrydockLease::initializeNewLease()\n  ->setResourceType('workingcopy'); // typo: no blueprint of this type\n\n// after\n$lease = DrydockLease::initializeNewLease()\n  ->setResourceType('working-copy'); // matches DrydockWorkingCopyBlueprintImplementation::getType()","handlingStrategy":"validation","validationCode":"$blueprints = id(new DrydockBlueprintQuery())\n  ->setViewer(PhabricatorUser::getOmnipotentUser())\n  ->withTypes(array($lease->getResourceType()))\n  ->withDisabled(false)\n  ->execute();\nif (!$blueprints) {\n  // fail fast with a clear message before queueing the lease\n  throw new Exception(pht('No enabled blueprint serves type \"%s\".', $lease->getResourceType()));\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Define the resource type string as a constant shared by leases and blueprint implementations.","Add a startup check that at least one enabled blueprint exists for every resource type your code leases."],"tags":["drydock","php","blueprint","configuration","permanent-failure","capacity"],"backgroundTag":"no-provider-available","analyzedSha":"5720a38cfe95b00ca4be5016dd0d2f3195f4fa04","analyzedAt":"2026-08-21T05:07:25.672Z","schemaVersion":2},"datasetVersion":"2026-08-21T11:28:35.574Z"}