phacility/phabricator · warning · PhutilArgumentUsageException

Specify one or more lease IDs to update with "%s".

Error message

Specify one or more lease IDs to update with "%s".

What it means

Thrown by the `drydock update-lease` management workflow when no `--id` argument was supplied. Unlike the release workflows there is no `--all` escape hatch — the update workflow deliberately requires an explicit, bounded lease list because it forces lease state updates through the workers in-process (it calls PhabricatorWorker::setRunAllTasksInProcess(true)), which is expensive per lease. It is a PhutilArgumentUsageException and aborts before any lease is touched.

Source

Thrown at src/applications/drydock/management/DrydockManagementUpdateLeaseWorkflow.php:26

      ->setName('update-lease')
      ->setSynopsis(pht('Update a lease.'))
      ->setArguments(
        array(
          array(
            'name' => 'id',
            'param' => 'id',
            'repeat' => true,
            'help' => pht('Lease ID to update.'),
          ),
        ));
  }

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

    $ids = $args->getArg('id');
    if (!$ids) {
      throw new PhutilArgumentUsageException(
        pht(
          'Specify one or more lease IDs to update with "%s".',
          '--id'));
    }

    $leases = id(new DrydockLeaseQuery())
      ->setViewer($viewer)
      ->withIDs($ids)
      ->execute();

    PhabricatorWorker::setRunAllTasksInProcess(true);

    foreach ($ids as $id) {
      $lease = idx($leases, $id);

      if (!$lease) {
        echo tsprintf(
          "%s\n",

View on GitHub (pinned to 5720a38cfe)

Solutions

  1. Re-run with one or more IDs: `./bin/drydock update-lease --id 55`
  2. Find candidate stuck lease IDs first: `./bin/drydock lease --status pending` or the Drydock lease UI
  3. Note `--id` is repeatable: `--id 1 --id 2 --id 3`
  4. There is intentionally no bulk mode; script the loop yourself over an explicit ID list

Example fix

// before
$ ./bin/drydock update-lease
Usage Exception: Specify one or more lease IDs to update with "--id".

// after
$ ./bin/drydock update-lease --id 55
Defensive patterns

Strategy: validation

Validate before calling

// Before invoking the workflow:
$ids = $args->getArg('id');
if (!$ids) {
  throw new PhutilArgumentUsageException(pht(
    'Pass one or more --id flags; there is no --all for update-lease.'));
}

Try / catch

catch (PhutilArgumentUsageException $ex) { print guidance; supply --id <n> (repeatable) and re-run }

Prevention

When it happens

Trigger: Running `./bin/drydock update-lease` with no flags; passing `--all` (not defined for this workflow, so the parser rejects it or it is ignored by getArg('id')); a script that builds the ID list dynamically and forwards nothing.

Common situations: Un-sticking a lease stuck in PENDING/ACQUIRED after a worker crash; forcing a lease through its update state machine during blueprint debugging; automation copying the invocation pattern of the release workflow.

Related errors


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