Closed Bug 1242281 Opened 9 years ago Closed 9 years ago

KeyError: 'pushlog' fetching pushlog with mozext

Categories

(Developer Services :: Mercurial: Pushlog, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: nalexander, Assigned: gps)

References

Details

Attachments

(2 files)

I have run |mach mercurial-setup| immediately before this: nalexander@chocho ~/M/gecko> hg pull fx-team pulling from ssh://hg.mozilla.org/integration/fx-team searching for changes adding changesets adding manifests adding file changes added 164 changesets with 4099 changes to 3760 files (+1 heads) transaction abort! rollback completed ** Unknown exception encountered with possibly-broken third-party extension trychooser ** which supports versions unknown of Mercurial. ** Please disable trychooser and try your action again. ** If that fixes the bug please report it to the extension author. ** Python 2.7.10 (default, Jul 14 2015, 19:46:27) [GCC 4.2.1 Compatible Apple LLVM 6.0 (clang-600.0.39)] ** Mercurial Distributed SCM (version 3.5.2) ** Extensions loaded: strip, mq, rebase, trychooser, crecord, record, qimportbz, bzexport, push-to-try, qbackout, histedit, purge, progress, color, graphlog, shelve, reviewboard, bzpost, firefoxtree, mozext, hgwatchman, pager, share, bundleclone, evolve Traceback (most recent call last): File "/usr/local/bin/hg", line 43, in <module> mercurial.dispatch.run() File "/usr/local/Cellar/mercurial/3.5.2/lib/python2.7/site-packages/mercurial/dispatch.py", line 30, in run sys.exit((dispatch(request(sys.argv[1:])) or 0) & 255) File "/usr/local/Cellar/mercurial/3.5.2/lib/python2.7/site-packages/mercurial/dispatch.py", line 92, in dispatch ret = _runcatch(req) File "/usr/local/Cellar/mercurial/3.5.2/lib/python2.7/site-packages/mercurial/dispatch.py", line 163, in _runcatch return _dispatch(req) File "/usr/local/Cellar/mercurial/3.5.2/lib/python2.7/site-packages/mercurial/dispatch.py", line 895, in _dispatch cmdpats, cmdoptions) File "/usr/local/Cellar/mercurial/3.5.2/lib/python2.7/site-packages/mercurial/dispatch.py", line 656, in runcommand ret = _runcommand(ui, options, cmd, d) File "/usr/local/Cellar/mercurial/3.5.2/lib/python2.7/site-packages/mercurial/extensions.py", line 171, in closure return func(*(args + a), **kw) File "/usr/local/Cellar/mercurial/3.5.2/lib/python2.7/site-packages/hgext/pager.py", line 130, in pagecmd return orig(ui, options, cmd, cmdfunc) File "/usr/local/Cellar/mercurial/3.5.2/lib/python2.7/site-packages/mercurial/extensions.py", line 171, in closure return func(*(args + a), **kw) File "/usr/local/Cellar/mercurial/3.5.2/lib/python2.7/site-packages/hgext/color.py", line 525, in colorcmd return orig(ui_, opts, cmd, cmdfunc) File "/usr/local/Cellar/mercurial/3.5.2/lib/python2.7/site-packages/mercurial/dispatch.py", line 1013, in _runcommand return checkargs() File "/usr/local/Cellar/mercurial/3.5.2/lib/python2.7/site-packages/mercurial/dispatch.py", line 982, in checkargs return cmdfunc() File "/usr/local/Cellar/mercurial/3.5.2/lib/python2.7/site-packages/mercurial/dispatch.py", line 892, in <lambda> d = lambda: util.checksignature(func)(ui, *args, **cmdoptions) File "/usr/local/Cellar/mercurial/3.5.2/lib/python2.7/site-packages/mercurial/util.py", line 792, in check return func(*args, **kwargs) File "/usr/local/Cellar/mercurial/3.5.2/lib/python2.7/site-packages/mercurial/extensions.py", line 171, in closure return func(*(args + a), **kw) File "/usr/local/Cellar/mercurial/3.5.2/lib/python2.7/site-packages/mercurial/util.py", line 792, in check return func(*args, **kwargs) File "/Users/nalexander/.mozbuild/version-control-tools/hgext/firefoxtree/__init__.py", line 439, in pullcommand return orig(ui, repo, source=source, **opts) File "/usr/local/Cellar/mercurial/3.5.2/lib/python2.7/site-packages/mercurial/util.py", line 792, in check return func(*args, **kwargs) File "/usr/local/Cellar/mercurial/3.5.2/lib/python2.7/site-packages/mercurial/extensions.py", line 171, in closure return func(*(args + a), **kw) File "/usr/local/Cellar/mercurial/3.5.2/lib/python2.7/site-packages/mercurial/util.py", line 792, in check return func(*args, **kwargs) File "/usr/local/Cellar/mercurial/3.5.2/lib/python2.7/site-packages/hgext/mq.py", line 3515, in mqcommand return orig(ui, repo, *args, **kwargs) File "/usr/local/Cellar/mercurial/3.5.2/lib/python2.7/site-packages/mercurial/util.py", line 792, in check return func(*args, **kwargs) File "/usr/local/Cellar/mercurial/3.5.2/lib/python2.7/site-packages/mercurial/extensions.py", line 171, in closure return func(*(args + a), **kw) File "/usr/local/Cellar/mercurial/3.5.2/lib/python2.7/site-packages/mercurial/util.py", line 792, in check return func(*args, **kwargs) File "/Users/nalexander/Devel/evolve-main/hgext/evolve.py", line 648, in warnobserrors ret = orig(ui, repo, *args, **kwargs) File "/usr/local/Cellar/mercurial/3.5.2/lib/python2.7/site-packages/mercurial/util.py", line 792, in check return func(*args, **kwargs) File "/usr/local/Cellar/mercurial/3.5.2/lib/python2.7/site-packages/mercurial/extensions.py", line 171, in closure return func(*(args + a), **kw) File "/usr/local/Cellar/mercurial/3.5.2/lib/python2.7/site-packages/mercurial/util.py", line 792, in check return func(*args, **kwargs) File "/Users/nalexander/Devel/evolve-main/hgext/evolve.py", line 626, in wrapmayobsoletewc res = origfn(ui, repo, *args, **opts) File "/usr/local/Cellar/mercurial/3.5.2/lib/python2.7/site-packages/mercurial/util.py", line 792, in check return func(*args, **kwargs) File "/usr/local/Cellar/mercurial/3.5.2/lib/python2.7/site-packages/mercurial/extensions.py", line 171, in closure return func(*(args + a), **kw) File "/usr/local/Cellar/mercurial/3.5.2/lib/python2.7/site-packages/mercurial/util.py", line 792, in check return func(*args, **kwargs) File "/usr/local/Cellar/mercurial/3.5.2/lib/python2.7/site-packages/hgext/rebase.py", line 1072, in pullrebase orig(ui, repo, *args, **opts) File "/usr/local/Cellar/mercurial/3.5.2/lib/python2.7/site-packages/mercurial/util.py", line 792, in check return func(*args, **kwargs) File "/usr/local/Cellar/mercurial/3.5.2/lib/python2.7/site-packages/mercurial/commands.py", line 5181, in pull opargs=pullopargs).cgresult File "/usr/local/Cellar/mercurial/3.5.2/lib/python2.7/site-packages/mercurial/extensions.py", line 171, in closure return func(*(args + a), **kw) File "/Users/nalexander/.mozbuild/version-control-tools/hgext/bundleclone/__init__.py", line 590, in pull res = orig(repo, remote, *args, **kwargs) File "/usr/local/Cellar/mercurial/3.5.2/lib/python2.7/site-packages/mercurial/extensions.py", line 171, in closure return func(*(args + a), **kw) File "/Users/nalexander/.mozbuild/version-control-tools/hgext/mozext/__init__.py", line 786, in pull res = orig(repo, remote, *args, **kwargs) File "/usr/local/Cellar/mercurial/3.5.2/lib/python2.7/site-packages/mercurial/extensions.py", line 171, in closure return func(*(args + a), **kw) File "/Users/nalexander/.mozbuild/version-control-tools/hgext/firefoxtree/__init__.py", line 337, in pull res = orig(repo, remote, *args, **kwargs) File "/usr/local/Cellar/mercurial/3.5.2/lib/python2.7/site-packages/mercurial/exchange.py", line 941, in pull _pullobsolete(pullop) File "/usr/local/Cellar/mercurial/3.5.2/lib/python2.7/site-packages/mercurial/extensions.py", line 171, in closure return func(*(args + a), **kw) File "/Users/nalexander/.mozbuild/version-control-tools/hgext/mozext/__init__.py", line 405, in exchangepullpushlog lines = pullop.remote._call('pushlog', firstpush=str(fetchfrom)) File "/usr/local/Cellar/mercurial/3.5.2/lib/python2.7/site-packages/mercurial/sshpeer.py", line 251, in _call self._callstream(cmd, **args) File "/usr/local/Cellar/mercurial/3.5.2/lib/python2.7/site-packages/mercurial/sshpeer.py", line 225, in _callstream _func, names = wireproto.commands[cmd] KeyError: 'pushlog' remote: ** Unknown exception encountered with possibly-broken third-party extension pushrebase remote: ** which supports versions 3.4 of Mercurial. remote: ** Please disable pushrebase and try your action again. remote: ** If that fixes the bug please report it to the extension author. remote: ** Python 2.7.10 (default, May 28 2015, 09:58:55) [GCC 4.4.7 20120313 (Red Hat 4.4.7-11)] remote: ** Mercurial Distributed SCM (version 3.6.2) remote: ** Extensions loaded: blackbox, clonebundles, bundleclone, pushlog, serverlog, pushrebase, readonly, vcsreplicator remote: Traceback (most recent call last): remote: File "/repo/hg/venv_pash/bin/hg", line 43, in <module> remote: mercurial.dispatch.run() remote: File "/repo/hg/venv_pash/lib64/python2.7/site-packages/mercurial/dispatch.py", line 54, in run remote: sys.exit((dispatch(request(sys.argv[1:])) or 0) & 255) remote: File "/repo/hg/venv_pash/lib64/python2.7/site-packages/mercurial/dispatch.py", line 116, in dispatch remote: ret = _runcatch(req) remote: File "/repo/hg/venv_pash/lib64/python2.7/site-packages/mercurial/dispatch.py", line 187, in _runcatch remote: return _dispatch(req) remote: File "/repo/hg/venv_pash/lib64/python2.7/site-packages/mercurial/dispatch.py", line 920, in _dispatch remote: cmdpats, cmdoptions) remote: File "/repo/hg/venv_pash/lib64/python2.7/site-packages/mercurial/dispatch.py", line 679, in runcommand remote: ret = _runcommand(ui, options, cmd, d) remote: File "/repo/hg/venv_pash/lib64/python2.7/site-packages/mercurial/dispatch.py", line 1051, in _runcommand remote: return checkargs() remote: File "/repo/hg/venv_pash/lib64/python2.7/site-packages/mercurial/dispatch.py", line 1011, in checkargs remote: return cmdfunc() remote: File "/repo/hg/venv_pash/lib64/python2.7/site-packages/mercurial/dispatch.py", line 917, in <lambda> remote: d = lambda: util.checksignature(func)(ui, *args, **cmdoptions) remote: File "/repo/hg/venv_pash/lib64/python2.7/site-packages/mercurial/util.py", line 801, in check remote: return func(*args, **kwargs) remote: File "/repo/hg/venv_pash/lib64/python2.7/site-packages/mercurial/commands.py", line 5919, in serve remote: s.serve_forever() remote: File "/repo/hg/version-control-tools/hgext/serverlog/__init__.py", line 321, in serve_forever remote: return super(sshserverwrapped, self).serve_forever() remote: File "/repo/hg/venv_pash/lib64/python2.7/site-packages/mercurial/sshserver.py", line 103, in serve_forever remote: while self.serve_one(): remote: File "/repo/hg/version-control-tools/hgext/serverlog/__init__.py", line 350, in serve_one remote: return super(sshserverwrapped, self).serve_one() remote: File "/repo/hg/venv_pash/lib64/python2.7/site-packages/mercurial/sshserver.py", line 121, in serve_one remote: rsp = wireproto.dispatch(self.repo, self, cmd) remote: File "/repo/hg/version-control-tools/hgext/serverlog/__init__.py", line 342, in dispatch remote: return origdispatch(repo, proto, cmd) remote: File "/repo/hg/venv_pash/lib64/python2.7/site-packages/mercurial/wireproto.py", line 470, in dispatch remote: args = proto.getargs(spec) remote: File "/repo/hg/venv_pash/lib64/python2.7/site-packages/mercurial/sshserver.py", line 41, in getargs remote: arg, l = argline.split() remote: ValueError: need more than 0 values to unpack
Fixed by adding the pushlog extension. So I suppose we should mutate this ticket to making the code ensure pushlog is present; or check and error that the pushlog extension is not present; or log when the extension is not present. gps: do you have a preference here? I expect artifact builders to see this Monday morning, and I'd like to update https://developer.mozilla.org/en-US/docs/Artifact_builds if the requirements have changed. nalexander@chocho ~/M/gecko> hg pull fx-team pulling from ssh://hg.mozilla.org/integration/fx-team searching for changes adding changesets adding manifests adding file changes added 164 changesets with 4099 changes to 3760 files (+1 heads) (not updating pushlog since changesets come from pull) added 4132 pushes added 3 pushes (run 'hg heads .' to see heads, 'hg merge' to merge)
Flags: needinfo?(gps)
Bleh. This is a regression from bug 1236618. I forgot that when you call a Mercurial wire protocol command via SSH, the client needs to have the server-side code available locally so it knows how to format parameters (or something like that). It's kind of wonky. The workaround is to not pull via ssh: pull via http. The proper solution is to do what bug 1236618 originally intended and add pushlog aggregation into the pushlog client extension instead of hacking it into mozext. The quick fix is to not call the "pushlog" wire protocol command when pulling from ssh (fall back to the HTTP JSON API instead). We could potentially also register the "pushlog" wire protocol command in the mozext extension if we really wanted to pile the quick and dirty hacks on. Ugh.
Flags: needinfo?(gps)
gps: what can we do here? I updated the artifact documentation https://developer.mozilla.org/en-US/docs/Artifact_builds, but can we throw a better error?
Flags: needinfo?(gps)
I'll figure out a workaround.
Assignee: nobody → gps
Status: NEW → ASSIGNED
Flags: needinfo?(gps)
We had multiple "from mercurial" blocks for reasons unknown to me. sys was unused. Review commit: https://reviewboard.mozilla.org/r/34385/diff/#index_header See other reviews: https://reviewboard.mozilla.org/r/34385/
Attachment #8718088 - Flags: review?(smacleod)
Attachment #8718088 - Flags: review?(smacleod) → review+
Comment on attachment 8718088 [details] MozReview Request: mozext: clean up imports; r?smacleod https://reviewboard.mozilla.org/r/34385/#review31207
Comment on attachment 8718089 [details] MozReview Request: mozext: don't attempt to pull pushlog when pulling via ssh:// (bug 1242281); r?smacleod https://reviewboard.mozilla.org/r/34387/#review31211
Attachment #8718089 - Flags: review?(smacleod) → review+
Autolanded.
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: