{"record":{"id":"cf38bff2903f1a06","repo":"phacility/phabricator","slug":"specify-one-or-more-lease-ids-to-update-with-s","errorCode":null,"errorMessage":"Specify one or more lease IDs to update with \"%s\".","messagePattern":"Specify one or more lease IDs to update with \"(.+?)\"\\.","errorType":"console","errorClass":"PhutilArgumentUsageException","httpStatus":null,"severity":"warning","filePath":"src/applications/drydock/management/DrydockManagementUpdateLeaseWorkflow.php","lineNumber":26,"sourceCode":"      ->setName('update-lease')\n      ->setSynopsis(pht('Update a lease.'))\n      ->setArguments(\n        array(\n          array(\n            'name' => 'id',\n            'param' => 'id',\n            'repeat' => true,\n            'help' => pht('Lease ID to update.'),\n          ),\n        ));\n  }\n\n  public function execute(PhutilArgumentParser $args) {\n    $viewer = $this->getViewer();\n\n    $ids = $args->getArg('id');\n    if (!$ids) {\n      throw new PhutilArgumentUsageException(\n        pht(\n          'Specify one or more lease IDs to update with \"%s\".',\n          '--id'));\n    }\n\n    $leases = id(new DrydockLeaseQuery())\n      ->setViewer($viewer)\n      ->withIDs($ids)\n      ->execute();\n\n    PhabricatorWorker::setRunAllTasksInProcess(true);\n\n    foreach ($ids as $id) {\n      $lease = idx($leases, $id);\n\n      if (!$lease) {\n        echo tsprintf(\n          \"%s\\n\",","sourceCodeStart":8,"sourceCodeEnd":44,"githubUrl":"https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/src/applications/drydock/management/DrydockManagementUpdateLeaseWorkflow.php#L8-L44","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","solutions":["Re-run with one or more IDs: `./bin/drydock update-lease --id 55`","Find candidate stuck lease IDs first: `./bin/drydock lease --status pending` or the Drydock lease UI","Note `--id` is repeatable: `--id 1 --id 2 --id 3`","There is intentionally no bulk mode; script the loop yourself over an explicit ID list"],"exampleFix":"// before\n$ ./bin/drydock update-lease\nUsage Exception: Specify one or more lease IDs to update with \"--id\".\n\n// after\n$ ./bin/drydock update-lease --id 55","handlingStrategy":"validation","validationCode":"// Before invoking the workflow:\n$ids = $args->getArg('id');\nif (!$ids) {\n  throw new PhutilArgumentUsageException(pht(\n    'Pass one or more --id flags; there is no --all for update-lease.'));\n}","typeGuard":null,"tryCatchPattern":"catch (PhutilArgumentUsageException $ex) { print guidance; supply --id <n> (repeatable) and re-run }","preventionTips":["This workflow has no bulk mode — script a loop over an explicit ID list","Discover stuck lease IDs with the lease query/UI first, then update","Remember each ID triggers in-process worker execution; keep lists bounded"],"tags":["drydock","phabricator","cli","usage-error","lease","argument-validation"],"backgroundTag":"cli-missing-required-argument","analyzedSha":"5720a38cfe95b00ca4be5016dd0d2f3195f4fa04","analyzedAt":"2026-08-21T05:07:25.672Z","schemaVersion":2},"datasetVersion":"2026-08-21T11:28:35.574Z"}