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

  1. Check the lease's resource type string against the blueprint implementation's getType() and correct the mismatch.
  2. 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.
  3. If the blueprint intentionally cannot serve this lease, fix its canAllocateResourcesForLease() logic or change what the lease requests.
  4. 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

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


AI-assisted analysis of phacility/phabricator@5720a38cfe (2026-08-21). Data as JSON: /api/errors/ea8ab3c1b1a425e9. Report an issue: GitHub.