Closed Bug 1676220 Opened 5 years ago Closed 5 years ago

moz-phab says "CommandError: command 'b'import'' failed to complete successfully" instead of detailing why the patch failed to apply

Categories

(Conduit :: moz-phab, defect)

Production
Desktop
All
defect

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: Gijs, Assigned: glob)

References

(Regression)

Details

Attachments

(2 files)

At time of writing, STR:

  1. central checkout from this Saturday (rev d366215bf9af )
  2. moz-phab patch -a . D9643

ER:
Something explaining where the conflicts are

AR:

Patching revisions: D95761 D95777 D95798 D95539 D96439
Checked out .
CommandError: command 'b'import'' failed to complete successfully
Run moz-phab again with '--trace' to show debugging output

Python info:

$ python --version
Python 2.7.16
$ python3 --version
Python 3.8.6

Full output with --trace:

DEBUG    2020-11-09 18:09:31,877 MozPhab (0.1.92)
DEBUG    2020-11-09 18:09:31,878 found hg repo in  (path elided)
DEBUG    2020-11-09 18:09:32,134 $ config
DEBUG    2020-11-09 18:09:32,143 hg extensions: absorb, blackbox, clang-format, evolve, firefoxtree, fsmonitor, histedit, js-format, phabqueue, push-to-try, rebase, share, shelve, show
DEBUG    2020-11-09 18:09:32,144 $ status --added --deleted --modified --unknown
DEBUG    2020-11-09 18:09:32,698 https://phabricator.services.mozilla.com/api/differential.revision.search {'constraints': {'ids': [96439]}, 'attachments': {'reviewers': True}}
DEBUG    2020-11-09 18:09:33,495 https://phabricator.services.mozilla.com/api/edge.search {'sourcePHIDs': ['PHID-DREV-hjqdro7wwdsshsq6k4dr'], 'types': ['revision.child']}
DEBUG    2020-11-09 18:09:34,246 https://phabricator.services.mozilla.com/api/edge.search {'sourcePHIDs': ['PHID-DREV-hjqdro7wwdsshsq6k4dr'], 'types': ['revision.parent']}
DEBUG    2020-11-09 18:09:35,004 https://phabricator.services.mozilla.com/api/edge.search {'sourcePHIDs': ['PHID-DREV-6mgqo2gg3fsx57vzt7hj'], 'types': ['revision.parent']}
DEBUG    2020-11-09 18:09:35,784 https://phabricator.services.mozilla.com/api/edge.search {'sourcePHIDs': ['PHID-DREV-o2323dpmxflzlkcbnzuz'], 'types': ['revision.parent']}
DEBUG    2020-11-09 18:09:36,636 https://phabricator.services.mozilla.com/api/edge.search {'sourcePHIDs': ['PHID-DREV-ganwb5w5loaccardqkol'], 'types': ['revision.parent']}
DEBUG    2020-11-09 18:09:37,394 https://phabricator.services.mozilla.com/api/edge.search {'sourcePHIDs': ['PHID-DREV-64z5sccvuwmy65f4v2lc'], 'types': ['revision.parent']}
DEBUG    2020-11-09 18:09:38,173 https://phabricator.services.mozilla.com/api/differential.revision.search {'constraints': {'phids': ['PHID-DREV-64z5sccvuwmy65f4v2lc', 'PHID-DREV-6mgqo2gg3fsx57vzt7hj', 'PHID-DREV-ganwb5w5loaccardqkol', 'PHID-DREV-o2323dpmxflzlkcbnzuz']}, 'attachments': {'reviewers': True}}
INFO     2020-11-09 18:09:39,089 Patching revisions: D95761 D95777 D95798 D95539 D96439
DEBUG    2020-11-09 18:09:39,089 https://phabricator.services.mozilla.com/api/differential.diff.search {'constraints': {'phids': ['PHID-DIFF-dt3b5ibyqkzbie7uqw2g', 'PHID-DIFF-6s5mdthcdxs6os7ctxps', 'PHID-DIFF-kzxbpiw6ramudbjfw6o3', 'PHID-DIFF-gd7mevydx3sun4665co5', 'PHID-DIFF-7ifhjtujmwccbxu2da2o']}, 'attachments': {'commits': True}}
DEBUG    2020-11-09 18:09:39,890 $ identify -q -r .
DEBUG    2020-11-09 18:09:39,942 ['8cdc2037b4b0']
DEBUG    2020-11-09 18:09:39,943 $ update --quiet .
INFO     2020-11-09 18:09:39,979 Checked out .
DEBUG    2020-11-09 18:09:39,980 https://phabricator.services.mozilla.com/api/differential.getrawdiff {'diffID': 362491}
DEBUG    2020-11-09 18:09:40,743 $ import /var/folders/mc/t3kwkv054cx8td6vv_ctsc9r0000gn/T/tmpejqfx219 --quiet
DEBUG    2020-11-09 18:09:40,866 patching file browser/components/places/tests/browser/browser_toolbar_other_bookmarks.js
Hunk #1 FAILED at 63
Hunk #2 succeeded at 220 with fuzz 1 (offset 92 lines).
1 out of 2 hunks FAILED -- saving rejects to file browser/components/places/tests/browser/browser_toolbar_other_bookmarks.js.rej
patching file browser/base/content/browser-places.js
Hunk #1 FAILED at 2255
1 out of 1 hunks FAILED -- saving rejects to file browser/base/content/browser-places.js.rej
abort: patch failed to apply

ERROR    2020-11-09 18:09:40,873 Traceback (most recent call last):
  File "/usr/local/lib/python3.8/site-packages/mozphab/mozphab.py", line 83, in main
    args.func(repo, args)
  File "/usr/local/lib/python3.8/site-packages/mozphab/commands/patch.py", line 229, in patch
    repo.apply_patch(raw, body, author, date_created)
  File "/usr/local/lib/python3.8/site-packages/mozphab/mercurial.py", line 527, in apply_patch
    self.hg(["import", changeset_file, "--quiet"])
  File "/usr/local/lib/python3.8/site-packages/mozphab/mercurial.py", line 149, in hg
    self.hg_out(command, **kwargs)
  File "/usr/local/lib/python3.8/site-packages/mozphab/mercurial.py", line 177, in hg_out
    out = self.repository.rawcommand(command, eh=error_handler)
  File "/usr/local/lib/python3.8/site-packages/hglib/client.py", line 265, in rawcommand
    return eh(ret, out, err)
  File "/usr/local/lib/python3.8/site-packages/mozphab/mercurial.py", line 169, in error_handler
    raise CommandError(
mozphab.exceptions.CommandError: command 'b'import'' failed to complete successfully
Regressed by: 1671351
Assignee: nobody → glob

Due to Bug 1676328 binary wheels for glean-sdk are not available on
Linux. Pin to the last know good version.

  • running hg(..) should always echo hg's output to stdout/stderr
  • switch order of stdout/stderr in debug log to match terminal
  • ensure current line is empty before output to avoid detritus from spinner

Depends on D96510

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

Attachment

General

Creator:
Created:
Updated:
Size: