phacility/phabricator · warning · PhutilArgumentUsageException
Specify one or more resource IDs to update with "%s".
Error message
Specify one or more resource IDs to update with "%s".
What it means
Thrown by the `drydock update-resource` management workflow when no `--id` argument was given. Identical contract to the lease updater: explicit repeatable IDs only, no `--all`, because each update runs resource update workers in-process. PhutilArgumentUsageException; nothing is modified.
Source
Thrown at src/applications/drydock/management/DrydockManagementUpdateResourceWorkflow.php:26
->setName('update-resource')
->setSynopsis(pht('Update a resource.'))
->setArguments(
array(
array(
'name' => 'id',
'param' => 'id',
'repeat' => true,
'help' => pht('Resource 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 resource IDs to update with "%s".',
'--id'));
}
$resources = id(new DrydockResourceQuery())
->setViewer($viewer)
->withIDs($ids)
->execute();
PhabricatorWorker::setRunAllTasksInProcess(true);
foreach ($ids as $id) {
$resource = idx($resources, $id);
if (!$resource) {
echo tsprintf(
"%s\n",View on GitHub (pinned to 5720a38cfe)
Solutions
- Re-run with explicit IDs: `./bin/drydock update-resource --id 9 --id 10`
- Discover the stuck resource IDs via `./bin/drydock resource --status pending` or the Drydock UI
- Verify flag spelling with `./bin/drydock update-resource --help`
- Wrap in a shell loop over IDs if you need bulk behavior
Example fix
// before $ ./bin/drydock update-resource Usage Exception: Specify one or more resource IDs to update with "--id". // after $ ./bin/drydock update-resource --id 9
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-resource.'));
} Try / catch
catch (PhutilArgumentUsageException $ex) { print guidance; supply --id <n> (repeatable) and re-run } Prevention
- Query pending/stuck resources first to build the ID list
- No bulk mode exists; loop explicitly over IDs in automation
- Verify flag spelling with --help after upgrades
When it happens
Trigger: Running `./bin/drydock update-resource` with an empty argv; assuming a default 'all pending resources' scope that does not exist; forwarding an empty array of IDs from a wrapper script.
Common situations: Forcing a resource through its activation/broken state machine after a daemon die-off; debugging a blueprint whose resources never leave PENDING; re-running a command from history after the resource list was cleared.
Related errors
- Specify which resources you want to release. See "--help" fo
- Select which leases you want to release. See "--help" for gu
- Specify one or more lease IDs to update with "%s".
- Resource "%s" does not exist.
- Specify the dumpfile to read with "--input", or use "--live"
AI-assisted analysis of phacility/phabricator@5720a38cfe (2026-08-21).
Data as JSON: /api/errors/1ef7bee640454684.
Report an issue: GitHub.