-
Notifications
You must be signed in to change notification settings - Fork 327
Open
Description
Description
The sl ghstack action command crashes with a RuntimeError when attempting to execute the action. The traceback suggests an issue with parameter formatting or handling within the ghstack extension, specifically when dealing with the input parameter in a GitHub API call.
Steps to Reproduce
Sapling SCM crashes and prints a full Python traceback:
$ sl ghstack action https://github.com/shikanime/shikanime/pull/483 --close
** Sapling SCM (version 0.2.20240718) has crashed:
Traceback (most recent call last):
File "static:sapling", line 86, in run
dispatch.run(args, fin, fout, ferr, ctx, skipprehooks)
File "static:sapling.dispatch", line 163, in run
status = (dispatch(req) or 0) & 255
^^^^^^^^^^^^^
File "static:sapling.dispatch", line 382, in dispatch
ret = _runcatch(req)
^^^^^^^^^^^^^^
File "static:sapling.dispatch", line 566, in _runcatch
return _callcatch(ui, req, _runcatchfunc)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "static:sapling.dispatch", line 575, in _callcatch
return scmutil.callcatch(ui, req, func)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "static:sapling.scmutil", line 153, in callcatch
return func()
^^^^^^
File "static:sapling.dispatch", line 553, in _runcatchfunc
return _dispatch(req)
^^^^^^^^^^^^^^
File "static:sapling.dispatch", line 1106, in _dispatch
ret = runcommand(
^^^^^^^^^^^
File "static:sapling.ext.undo", line 176, in _runcommandwrapper
result = orig(lui, repo, cmd, fullargs, *args)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "static:sapling.ext.undo", line 120, in origunsetpid
return _orig(*args, **opts)
^^^^^^^^^^^^^^^^^^^^
File "static:sapling.ext.journal", line 83, in runcommand
return orig(lui, repo, cmd, fullargs, *args)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "static:sapling.dispatch", line 789, in runcommand
ret = _runcommand(ui, options, cmd, d)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "static:sapling.dispatch", line 1157, in _runcommand
return cmdfunc()
^^^^^^^^^
File "static:sapling.dispatch", line 1105, in <lambda>
d = lambda: util.checksignature(func)(ui, *args, **strcmdopt)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "static:sapling.util", line 1376, in check
return func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
File "static:sapling.ext.ghstack", line 195, in action_cmd
ghstack.action.main(
File "static:ghstack.action", line 30, in main
github.graphql_sync(
File "static:ghstack.github_cli_endpoint", line 47, in graphql_sync
result = loop.run_until_complete(make_request(params, hostname=self.hostname))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "static:asyncio.base_events", line 654, in run_until_complete
return future.result()
^^^^^^^^^^^^^^^
File "static:ghstack.github_gh_cli", line 29, in make_request
return await _make_request(params, hostname, endpoint, method)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "static:ghstack.github_gh_cli", line 46, in _make_request
+ list(itertools.chain(*[_format_param(k, v) for (k, v) in params.items()]))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "static:ghstack.github_gh_cli", line 46, in <listcomp>
+ list(itertools.chain(*[_format_param(k, v) for (k, v) in params.items()]))
^^^^^^^^^^^^^^^^^^^
File "static:ghstack.github_gh_cli", line 96, in _format_param
raise RuntimeError(f"unexpected param: {key}={value}")
RuntimeError: unexpected param: input={'pullRequestId': 'PR_kwDOEy2jiM6yMeW9', 'clientMutationId': 'A'}Context
- Sapling SCM Version:
0.2.20240718 - Source: The crash occurs inside
ghstack.github_gh_cli._format_param, suggesting a compatibility or formatting issue with the parameter being passed to the GitHub CLI/API call.
Metadata
Metadata
Assignees
Labels
No labels