phacility/phabricator · warning · PhutilArgumentUsageException

No such buildable "%s"!

Error message

No such buildable "%s"!

What it means

The single positional name given to `harbormaster build` did not resolve to any object via PhabricatorObjectQuery->withNames() (monograms like D123, callsigns, raw PHIDs). A usage exception is thrown naming the offending value.

Source

Thrown at src/applications/harbormaster/management/HarbormasterManagementBuildWorkflow.php:47

  }

  public function execute(PhutilArgumentParser $args) {
    $viewer = $this->getViewer();

    $names = $args->getArg('buildable');
    if (count($names) != 1) {
      throw new PhutilArgumentUsageException(
        pht('Specify exactly one buildable object, by object name.'));
    }

    $name = head($names);

    $buildable = id(new PhabricatorObjectQuery())
      ->setViewer($viewer)
      ->withNames($names)
      ->executeOne();
    if (!$buildable) {
      throw new PhutilArgumentUsageException(
        pht('No such buildable "%s"!', $name));
    }

    if (!($buildable instanceof HarbormasterBuildableInterface)) {
      throw new PhutilArgumentUsageException(
        pht('Object "%s" is not a buildable!', $name));
    }

    $plan_id = $args->getArg('plan');
    if (!$plan_id) {
      throw new PhutilArgumentUsageException(
        pht(
          'Use %s to specify a build plan to run.',
          '--plan'));
    }

    $plan = id(new HarbormasterBuildPlanQuery())
      ->setViewer($viewer)

View on GitHub (pinned to 5720a38cfe)

Solutions

  1. Use an unambiguous monogram (D123) or a full PHID string.
  2. Verify the object exists: open it in the web UI or run `phid.lookup` / `phid.query` conduit with the same name.
  3. Check for typos — the name must resolve exactly as the object resolver would render it.

Example fix

# before
./bin/phabricator harbormaster build --plan 3 D12P

# after
./bin/phabricator harbormaster build --plan 3 D123
Defensive patterns

Strategy: validation

Validate before calling

// Resolve before invoking:
$results = id(new PhabricatorObjectQuery())
  ->setViewer($viewer)
  ->withNames(array($name))
  ->execute();
if (count($results) !== 1) {
  // name is not resolvable; do not run the build command
}

Type guard

function isResolvableObjectName($viewer, $name) {
  $query = id(new PhabricatorObjectQuery())
    ->setViewer($viewer)
    ->withNames(array($name));
  $query->execute();
  return (bool)$query->getNamedResults();
}

Try / catch

try {
  runBuildWorkflow($args);
} catch (PhutilArgumentUsageException $e) {
  if (preg_match('/No such buildable/', $e->getMessage())) {
    // fix the name or skip this object in automation
  }
}

Prevention

When it happens

Trigger: A typo'd monogram (D12P, O123); a PHID with a truncated or invalid format; naming an object the acting administrator cannot see (CLI viewer must still pass policies); an ambiguous name the name resolver refuses to guess.

Common situations: Passing a commit hash instead of a monogram/PHID; mixing up the Diffusion 'rXYZabcdef' style with plain hashes; running as a CLI admin whose handle resolves differently than expected.

Related errors


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