phacility/phabricator · error · Exception
Blueprint " " (of type " ") is not properly implemented…
Error message
Blueprint "%s" (of type "%s") is not properly implemented: %s must actually allocate the resource it returns.
What it means
DrydockResourceUpdateWorker::activateResource() calls the blueprint's activateResource() and then verifies the resource actually became active (isActivatedResource() is set by DrydockResource::activateResource()). If the blueprint returned without activating, this exception fires. Note the message text is a copy of the allocation validator ('allocateResource()') even though it guards activation, which can mislead; the fix is in the blueprint's activateResource().
Solutions
- End the blueprint's activateResource() with $resource->activateResource() on every success path.
- Throw on failure paths instead of returning quietly.
- Ignore the misleading 'allocateResource()' wording in the message; the validator runs after activation, not allocation.
Example fix
// before
public function activateResource(DrydockResource $resource) {
$this->provisionStorage($resource);
// missing $resource->activateResource()
}
// after
public function activateResource(DrydockResource $resource) {
$this->provisionStorage($resource);
$resource->activateResource();
} Defensive patterns
Strategy: validation
Validate before calling
if (!$resource->isActivatedResource()) {
throw new Exception(
pht('activateResource() returned without activating; call $resource->activateResource().'));
} Prevention
- End blueprint activateResource() with $resource->activateResource() on every success path.
- Ignore the 'allocateResource()' wording in the message; this validator runs after activation.
When it happens
Trigger: Custom blueprint activateResource() that does provisioning work but never calls $resource->activateResource(); calling it conditionally and returning on a skipped branch.
Common situations: Writing the activation step of a custom blueprint; porting a blueprint written before explicit activation existed; being misled by the 'allocateResource()' text in the message into fixing the wrong method.
Understand the failure class
Background: "Invalid state transition" errors: "status must be X, actually Y", "already rejected/charging/uninstalled", "cannot ... while running" — what they mean when a library rejects your call — this error's family across 31 libraries.
Related errors
- Blueprint " " (of type " ") is not properly implemented…
- Blueprint " " (of type " ") is not properly implemented: it…
- Blueprint " " (of type " ") is not properly implemented: it…
- Blueprint " " (of type " ") is not properly implemented…
- Blueprint " " (of type " ") is not properly implemented: it…
AI-assisted analysis of phacility/phabricator@5720a38cfe (2026-08-21).
Data as JSON: /api/errors/fd2282ec2e5c9c7a.
Report an issue: GitHub.
Appendix: source
Thrown at src/applications/drydock/worker/DrydockResourceUpdateWorker.php:189
$blueprint->activateResource($resource);
$this->validateActivatedResource($blueprint, $resource);
$awaken_ids = $this->getTaskDataValue('awakenOnActivation');
if (is_array($awaken_ids) && $awaken_ids) {
PhabricatorWorker::awakenTaskIDs($awaken_ids);
}
}
/**
* @task activate
*/
private function validateActivatedResource(
DrydockBlueprint $blueprint,
DrydockResource $resource) {
if (!$resource->isActivatedResource()) {
throw new Exception(
pht(
'Blueprint "%s" (of type "%s") is not properly implemented: %s '.
'must actually allocate the resource it returns.',
$blueprint->getBlueprintName(),
$blueprint->getClassName(),
'allocateResource()'));
}
}
/* -( Releasing Resources )------------------------------------------------ */
/**
* @task release
*/
private function releaseResource(View on GitHub (pinned to 5720a38cfe)