Closed Bug 1569162 Opened 7 years ago Closed 7 years ago

moz-phab 1.31 raises a KeyError when trying to submit a patch for moz-phab

Categories

(Conduit :: moz-phab, defect, P1)

Production
defect

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: sg, Assigned: zalun)

References

Details

(Keywords: conduit-triaged)

Attachments

(1 file, 1 obsolete file)

I have a git clone of https://github.com/mozilla-conduit/review with two remotes. When I call moz-phab, I get the following output:

$ moz-phab --trace 
!! Found multiple upstreams (origin, upstream).
Determining the commit range using upstream "origin"
Submitting 11 commits for review:
Traceback (most recent call last):
  File "/home/osboxes/.local/bin/moz-phab", line 3808, in main
    args.func(repo, args)
  File "/home/osboxes/.local/bin/moz-phab", line 2938, in submit
    show_commit_stack(commits, validate=True, ignore_reviewers=args.wip)
  File "/home/osboxes/.local/bin/moz-phab", line 2481, in show_commit_stack
    conduit.get_revisions(ids=ids)
  File "/home/osboxes/.local/bin/moz-phab", line 796, in get_revisions
    revisions[phids_by_id[rev_id]] for rev_id in ids if phids_by_id[rev_id]
KeyError: '39320'

origin is my fork, upstream is ... well the upstream. I tried to set the remote explicitly to use upstream, which yields a different error, which I don't quite understand (upstream is no commit but the name of the remote):

$ moz-phab --trace --remote upstream
fatal: Unknown commit upstream
Traceback (most recent call last):
  File "/home/osboxes/.local/bin/moz-phab", line 3804, in main
    repo = repo_from_args(args)
  File "/home/osboxes/.local/bin/moz-phab", line 943, in repo_from_args
    repo.set_args(args)
  File "/home/osboxes/.local/bin/moz-phab", line 1907, in set_args
    start = self._get_first_unpublished_node()
  File "/home/osboxes/.local/bin/moz-phab", line 1844, in _get_first_unpublished_node
    unpublished = self._cherry(cherry, remotes)
  File "/home/osboxes/.local/bin/moz-phab", line 1819, in _cherry
    return self.git_out(command)
  File "/home/osboxes/.local/bin/moz-phab", line 1772, in git_out
    self._git + command, cwd=path or self.path, env=env, **kwargs
  File "/home/osboxes/.local/bin/moz-phab", line 323, in check_output
    "command '%s' failed to complete successfully" % command[0], e.returncode
CommandError: command 'git' failed to complete successfully
Version: Development/Staging → Production

I'm trying to replicate now

Assignee: nobody → pzalewa
Keywords: conduit-triaged
Priority: -- → P1

Note: :sg If that's your common setup, you could set the git_remote in .moz-phab-config:

[git]
remote = upstream

The patch fixes the second problem :) However, the first problem still exists. Maybe this is not a valid use, but getting a KeyError is at least confusing for the user.

39320 appear to refer to a Phabricator review, which is inaccessible. I just checked that I cannot access https://phabricator.services.mozilla.com/D39320 (Access Denied: Restricted Differential Revision).

Summary: moz-phab 1.31 throws a KeyError when trying to submit a patch for moz-phab → moz-phab 1.31 raises a KeyError when trying to submit a patch for moz-phab

The bug is split, revision D39688 is now related to bug 1570648

Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED

Comment on attachment 9081255 [details]
Bug 1569162 - Ignore inaccessible Phabricator revisions r=zalun

Revision D39688 was moved to bug 1570648. Setting attachment 9081255 [details] to obsolete.

Attachment #9081255 - Attachment is obsolete: true
Duplicate of this bug: 1546645
Blocks: 1546645
No longer duplicate of this bug: 1546645
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: