phacility/phabricator · warning · PhutilArgumentUsageException
Unable to load build log "%s".
Error message
Unable to load build log "%s".
What it means
Thrown by 'bin/harbormaster rebuild-log' when --id is given but HarbormasterBuildLogQuery (run with the CLI viewer) loads no HarbormasterBuildLog with that ID. The number supplied does not match any log row in this instance, so there is nothing to rebuild.
Source
Thrown at src/applications/harbormaster/management/HarbormasterManagementRebuildLogWorkflow.php:65
pht(
'Choose a build log to rebuild with "--id", or rebuild all '.
'logs with "--all".'));
}
if ($is_all && $log_id) {
throw new PhutilArgumentUsageException(
pht(
'You can not specify both "--id" and "--all". Choose one or '.
'the other.'));
}
if ($log_id) {
$log = id(new HarbormasterBuildLogQuery())
->setViewer($viewer)
->withIDs(array($log_id))
->executeOne();
if (!$log) {
throw new PhutilArgumentUsageException(
pht(
'Unable to load build log "%s".',
$log_id));
}
$logs = array($log);
} else {
$logs = new LiskMigrationIterator(new HarbormasterBuildLog());
}
PhabricatorWorker::setRunAllTasksInProcess(true);
foreach ($logs as $log) {
echo tsprintf(
"%s\n",
pht(
'Rebuilding log "%s"...',
pht('Build Log %d', $log->getID())));
View on GitHub (pinned to 5720a38cfe)
Solutions
- Confirm the ID from the build log URL (a URI like /log/123/ means --id 123)
- Verify the ID exists with the harbormaster.log.search Conduit method before rebuilding
- If the log is gone, rebuilding is impossible; regenerate it by re-running the build
Example fix
# before $ bin/harbormaster rebuild-log --id 99999 # after $ bin/harbormaster rebuild-log --id 123
Defensive patterns
Strategy: validation
Validate before calling
$log = id(new HarbormasterBuildLogQuery())
->setViewer($viewer)
->withIDs(array($log_id))
->executeOne();
if (!$log) {
// handle the missing log before invoking rebuild-log
} Prevention
- Extract log IDs from the canonical log URI rather than from memory
- Verify IDs with harbormaster.log.search in scripted rebuild jobs
When it happens
Trigger: Running 'bin/harbormaster rebuild-log --id 99999' where no log with that ID exists; using an ID copied from a different Phabricator instance; targeting a log already removed by garbage collection.
Common situations: Copying a log URI from another environment; transposed digits when typing the ID; the log was deleted after the build was cleaned up.
Related errors
- Choose a build log to rebuild with "--id", or rebuild all lo
- You can not specify both "--id" and "--all". Choose one or t
- No such buildable "%s"!
- The specified buildable does not have a build with ID "%s".
- Choose a build target to attach the log to with "--target".
AI-assisted analysis of phacility/phabricator@5720a38cfe (2026-08-21).
Data as JSON: /api/errors/3ba594c6024dcc8a.
Report an issue: GitHub.