{"record":{"id":"2fb4391384e3d64c","repo":"phacility/phabricator","slug":"unable-to-promote-s-for-repository-s-because","errorCode":null,"errorMessage":"Unable to promote \"%s\" for repository \"%s\" because this cluster already has one or more unambiguous leaders: %s.","messagePattern":"Unable to promote \"(.+?)\" for repository \"(.+?)\" because this cluster already has one or more unambiguous leaders: (.+?)\\.","errorType":"console","errorClass":"PhutilArgumentUsageException","httpStatus":null,"severity":"error","filePath":"src/applications/repository/management/PhabricatorRepositoryManagementThawWorkflow.php","lineNumber":273,"sourceCode":"                  'Repository \"%s\" has versions on inactive devices. Demote '.\n                  '(or reactivate) these devices before promoting a new '.\n                  'leader: %s.',\n                  $repository->getDisplayName(),\n                  $handle_list));\n            }\n\n            // Now, make sure there are no outstanding versions on devices with\n            // active bindings. These also need to be demoted (or promoting is\n            // a mistake or already happened).\n            $active = array_select_keys($versions, array_keys($bindings));\n            if ($active) {\n              $handles = $viewer->loadHandles(array_keys($active));\n\n              $handle_list = iterator_to_array($handles);\n              $handle_list = mpull($handle_list, 'getName');\n              $handle_list = implode(', ', $handle_list);\n\n              throw new PhutilArgumentUsageException(\n                pht(\n                  'Unable to promote \"%s\" for repository \"%s\" because this '.\n                  'cluster already has one or more unambiguous leaders: %s.',\n                  $device->getName(),\n                  $repository->getDisplayName(),\n                  $handle_list));\n            }\n\n            PhabricatorRepositoryWorkingCopyVersion::updateVersion(\n              $repository->getPHID(),\n              $device->getPHID(),\n              0);\n\n            echo tsprintf(\n              \"%s\\n\",\n              pht(\n                'Promoted \"%s\" to become a leader for \"%s\".',\n                $device->getName(),","sourceCodeStart":255,"sourceCodeEnd":291,"githubUrl":"https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/src/applications/repository/management/PhabricatorRepositoryManagementThawWorkflow.php#L255-L291","documentation":"Error \"Unable to promote \"%s\" for repository \"%s\" because this cluster already has one or more unambiguous leaders: %s.\" thrown in phacility/phabricator.","triggerScenarios":"Thrown at src/applications/repository/management/PhabricatorRepositoryManagementThawWorkflow.php:273 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"5720a38cfe95b00ca4be5016dd0d2f3195f4fa04","analyzedAt":"2026-08-21T05:07:25.672Z","schemaVersion":2},"datasetVersion":"2026-08-21T11:28:35.574Z"}