Page MenuHomePhabricator

Unable to resolve method 'describeAutomaticCapability'
Closed, ResolvedPublic

Description

I wanted to use the bin/policy command line script to unlock a repository. bin/policy unlock <repo> worked fine, but bin/policy show <repo> threw an error. This seems very similar to T12015. This traceback also appears just for repositories. Tasks, diffs, commits, and pastes do not throw an error.

Reproduction steps:

  • Run bin/policy show <repository> from the command line

Expected result:

  • Just the policy information for the repository

Actual result:

  • The policy for the repository + the traceback below:
$ bin/policy --trace show rD 
>>> [2] <connect> phabricator_repository
<<< [2] <connect> 2,064 us
>>> [3] <query> SELECT `r`.*, r.* FROM `repository` r  WHERE ((r.callsign IN ('D')))   ORDER BY `r`.`id` DESC 
<<< [3] <query> 328 us
>>> [4] <query> SELECT `r`.*, r.* FROM `repository` r  WHERE (r.phid IN ('PHID-REPO-goxie643hbb42vyzk3ue'))   ORDER BY `r`.`id` DESC 
<<< [4] <query> 257 us
OBJECT

  rD repo_name

CAPABILITIES

  view
    All Users
    Logged in users can take this action.

[2017-04-11 18:25:14] EXCEPTION: (Exception) Unable to resolve method 'describeAutomaticCapability'. at [<phabricator>/src/infrastructure/storage/lisk/LiskDAO.php:1775]
arcanist(head=stable, ref.stable=3512c4ab86d6), phabricator(head=stable, ref.stable=944f7da48670), phutil(head=stable, ref.stable=f568eb7b9542)
  #0 LiskDAO::call(string, array) called at [<phabricator>/src/infrastructure/storage/lisk/LiskDAO.php:1725]
  #1 PhabricatorRepository::describeAutomaticCapability(string) called at [<phabricator>/src/applications/policy/management/PhabricatorPolicyManagementShowWorkflow.php:69]
  #2 PhabricatorPolicyManagementShowWorkflow::execute(PhutilArgumentParser) called at [<phutil>/src/parser/argument/PhutilArgumentParser.php:441]
  #3 PhutilArgumentParser::parseWorkflowsFull(array) called at [<phutil>/src/parser/argument/PhutilArgumentParser.php:333]
  #4 PhutilArgumentParser::parseWorkflows(array) called at [<phabricator>/scripts/setup/manage_policy.php:21]
Version info
phabricator944f7da486708db3f4f4491cf7c6bc3ab919fa60 (Mon, Apr 10)(branched from 7707685733d26bf1c7278a2f338416a038c2709b on origin)
arcanist3512c4ab86d66a103a6733a0589177f93b6d6811 (Fri, Apr 7)(branched from a59cfca5f190c44403dfc7449c678a2aa1626bb4 on origin)
phutilf568eb7b9542259cd3c0dcb3405cc9a83c90a2f5 (Mon, Apr 3)(branched from c581e769f10c6d2b427900897edba74e01a572bd on origin)