Closed Bug 1585657 Opened 6 years ago Closed 6 years ago

Using group alias as reviewer results in AttributeError: 'list' object has no attribute 'keys'

Categories

(Conduit :: Phabricator, defect, P2)

defect

Tracking

(Not tracked)

RESOLVED WORKSFORME

People

(Reporter: whimboo, Assigned: zalun)

References

Details

(Keywords: conduit-triaged)

When using a reviewer group like #remote-protocol the above mentioned error is shown when trying to push to phabricator. Looks like bug 1547678 fixed it only partly, or it regressed again.

Keywords: conduit-triaged
Priority: -- → P2

Note that remote-protocol-reviewers works.

Please provide the error info (prefix the command with the DEBUG=1).

I've tried this and it seems fine:

(D46757) be9564be4cc2 Bug 1582122 - Do not fail if config line without "=" r=#non-existing-group
Unable to submit commits:

be9564be4cc2 Bug 1582122 - Do not fail if config line without "=" r=glob
- #non-existing-group is not a valid reviewer's name
Flags: needinfo?(hskupin)

DEBUG    2019-10-04 11:06:33,167 found hg repo in /Users/henrik/code/gecko
DEBUG    2019-10-04 11:06:33,167 $ hg --version --quiet
DEBUG    2019-10-04 11:06:33,334 Mercurial Distributed SCM (version 5.0)
DEBUG    2019-10-04 11:06:33,334 $ hg config
DEBUG    2019-10-04 11:06:33,538 $ hg --config extensions.rebase= log -T '{node}\n' -r 'ancestors(.) and not public() and not obsolete()'
DEBUG    2019-10-04 11:06:34,093 80ff165823f7c160b821acb9cef7be9deb5977eb
DEBUG    2019-10-04 11:06:34,094 $ hg --config extensions.rebase= log -T '{node}\n' -r .
DEBUG    2019-10-04 11:06:34,323 80ff165823f7c160b821acb9cef7be9deb5977eb
DEBUG    2019-10-04 11:06:34,323 $ hg --config extensions.rebase= log -T '{rev} {node} {desc}--ecca9668e411415cb339dd7c54135065--\n' -r 80ff165823f7::80ff165823f7
DEBUG    2019-10-04 11:06:34,643 561237 80ff165823f7c160b821acb9cef7be9deb5977eb Bug 1547961 - [remote] Unskip browser_runtime_executionContext.js on Mac and Windows. r=#remote-protocol--ecca9668e411415cb339dd7c54135065--

DEBUG    2019-10-04 11:06:34,643 $ hg --config extensions.rebase= log -T '{node}\n' -r 'children(80ff165823f7c160b821acb9cef7be9deb5977eb)'
WARNING  2019-10-04 11:06:34,958 Submitting 1 commit:
INFO     2019-10-04 11:06:34,958 (New) 561237:80ff165823f7 Bug 1547961 - [remote] Unskip browser_runtime_executionContext.js on Mac and Windows. r=#remote-protocol
DEBUG    2019-10-04 11:06:34,958 $ hg --config extensions.rebase= log -T '{node}\n' -r 'ancestor(80ff165823f7::80ff165823f7)'
DEBUG    2019-10-04 11:06:35,269 80ff165823f7c160b821acb9cef7be9deb5977eb
DEBUG    2019-10-04 11:06:35,270 $ hg --config extensions.rebase= log -T '{phase} {node}\n' -r 'parents(80ff165823f7c160b821acb9cef7be9deb5977eb)'
DEBUG    2019-10-04 11:06:35,557 public 678d4d2c3c4dfe1dbb2edfdc26d9f0723acebdd2
DEBUG    2019-10-04 11:06:35,557 $ hg --config extensions.rebase= log -T '{node}\n' -r '80ff165823f7::80ff165823f7 and merge()'
DEBUG    2019-10-04 11:06:35,878 $ hg --config extensions.rebase= status --added --deleted --modified --unknown
DEBUG    2019-10-04 11:06:36,355 ? .pytest_cache/.gitignore
? .pytest_cache/CACHEDIR.TAG
? .pytest_cache/README.md
? .pytest_cache/v/cache/lastfailed
? .pytest_cache/v/cache/nodeids
? .pytest_cache/v/cache/stepwise
? tooltool-cache/.metadata_never_index
DEBUG    2019-10-04 11:06:36,358 Arc stdin: {'queryKey': 'active', 'constraints': {'slugs': ['#remote-protocol']}}
DEBUG    2019-10-04 11:06:36,358 $ /Users/henrik/.mozbuild/arcanist/bin/arc --trace call-conduit project.search
Config: Reading user configuration file "/Users/henrik/.arcrc"...
Config: Did not find system configuration at "/etc/arcconfig".
Working Copy: Reading .arcconfig from "/Users/henrik/code/gecko/.arcconfig".
Working Copy: Path "/Users/henrik/code/gecko" is part of `hg` working copy "/Users/henrik/code/gecko".
Working Copy: Project root is at "/Users/henrik/code/gecko".
Config: Did not find local configuration at "/Users/henrik/code/gecko/.hg/arc/config".
>>> [0] (+0) <http> https://phabricator.services.mozilla.com/api/user.whoami
<<< [0] (+1,054) <http> 1,054,162 us
>>> [1] (+1,054) <http> https://phabricator.services.mozilla.com/api/project.search
<<< [1] (+1,337) <http> 282,752 us
DEBUG    2019-10-04 11:06:37,802  ARGV  '/Users/henrik/.mozbuild/arcanist/bin/../scripts/arcanist.php' '--trace' 'call-conduit' 'project.search'
 LOAD  Loaded "phutil" from "/Users/henrik/.mozbuild/libphutil/src".
 LOAD  Loaded "arcanist" from "/Users/henrik/.mozbuild/arcanist/src".
{"error":null,"errorMessage":null,"response":{"data":[],"maps":{"slugMap":[]},"query":{"queryKey":"active"},"cursor":{"limit":100,"after":null,"before":null,"order":null}}}
ERROR    2019-10-04 11:06:37,803 Traceback (most recent call last):
  File "/Users/henrik/.mozbuild/moz-phab/moz-phab", line 3191, in main
    args.func(repo, args)
  File "/Users/henrik/.mozbuild/moz-phab/moz-phab", line 2391, in submit
    repo.check_commits_for_submit(commits)
  File "/Users/henrik/.mozbuild/moz-phab/moz-phab", line 1240, in check_commits_for_submit
    super(Mercurial, self).check_commits_for_submit(commits)
  File "/Users/henrik/.mozbuild/moz-phab/moz-phab", line 652, in check_commits_for_submit
    for invalid_reviewer in check_for_invalid_reviewers(all_reviewers, self.path):
  File "/Users/henrik/.mozbuild/moz-phab/moz-phab", line 2060, in check_for_invalid_reviewers
    for r in result["maps"]["slugMap"].keys()
AttributeError: 'list' object has no attribute 'keys'

Please note that #remote-protocol-reviewers exists, and for #webdriver-reviewers we can also use just #webdriver.

Flags: needinfo?(hskupin)

Thanks

Summary: Using #remote-protocol as reviewer results in AttributeError: 'list' object has no attribute 'keys' → Using group alias as reviewer results in AttributeError: 'list' object has no attribute 'keys'

Maybe there has no group alias been set for remote-protocol? It would clearly be nice to have that by default when requesting new groups.

Maybe it isn't set, but it shouldn't check for the slugMap as a dict when it's a list.
I will investigate this.

Assignee: nobody → pzalewa

I can't replicate.
It also seems like an old version of moz-phab. There is no such line in the code for r in result["maps"]["slugMap"].keys()
Please upgrade by running moz-phab self-update and reopen if the issue persist.

Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → WORKSFORME
Depends on: 1626392
You need to log in before you can comment on or make changes to this bug.