phacility/phabricator · error · PhabricatorWorkerPermanentFailureException
No active Drydock blueprint exists which can ever allocate a
Error message
No active Drydock blueprint exists which can ever allocate a resource for lease "%s".
What it means
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.
Source
Thrown at src/applications/drydock/worker/DrydockLeaseUpdateWorker.php:182
/* -( Drydock Allocator )-------------------------------------------------- */
/**
* Find or build a resource which can satisfy a given lease request, then
* acquire the lease.
*
* @param DrydockLease Requested lease.
* @return void
* @task allocator
*/
private function executeAllocator(DrydockLease $lease) {
$blueprints = $this->loadBlueprintsForAllocatingLease($lease);
// If we get nothing back, that means no blueprint is defined which can
// ever build the requested resource. This is a permanent failure, since
// we don't expect to succeed no matter how many times we try.
if (!$blueprints) {
throw new PhabricatorWorkerPermanentFailureException(
pht(
'No active Drydock blueprint exists which can ever allocate a '.
'resource for lease "%s".',
$lease->getPHID()));
}
// First, try to find a suitable open resource which we can acquire a new
// lease on.
$resources = $this->loadAcquirableResourcesForLease($blueprints, $lease);
list($free_resources, $used_resources) = $this->partitionResources(
$lease,
$resources);
$resource = $this->leaseAnyResource($lease, $free_resources);
if ($resource) {
return $resource;
}View on GitHub (pinned to 5720a38cfe)
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.
Example fix
// before
$lease = DrydockLease::initializeNewLease()
->setResourceType('workingcopy'); // typo: no blueprint of this type
// after
$lease = DrydockLease::initializeNewLease()
->setResourceType('working-copy'); // matches DrydockWorkingCopyBlueprintImplementation::getType() Defensive patterns
Strategy: validation
Validate before calling
$blueprints = id(new DrydockBlueprintQuery())
->setViewer(PhabricatorUser::getOmnipotentUser())
->withTypes(array($lease->getResourceType()))
->withDisabled(false)
->execute();
if (!$blueprints) {
// fail fast with a clear message before queueing the lease
throw new Exception(pht('No enabled blueprint serves type "%s".', $lease->getResourceType()));
} Prevention
- 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.
When it happens
Trigger: 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.
Common situations: 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.
Related errors
- This blueprint ("%s") does not define any Almanac Service PH
- Some of the Almanac Services defined by this blueprint could
- Blueprint "%s" (of type "%s") is not properly implemented: %
- Blueprint "%s" (of type "%s") is not properly implemented: %
- Blueprint "%s" (of type "%s") is not properly implemented: i
AI-assisted analysis of phacility/phabricator@5720a38cfe (2026-08-21).
Data as JSON: /api/errors/ea8ab3c1b1a425e9.
Report an issue: GitHub.