Open
Description
Description
Sometime the prep-git
action fails with an error relative to the remote ref, for example in jupyterlab/jupyter-collaboration#378:
fatal: couldn't find remote ref refs/pull/378/merge
.
The workaround is to close the PR and open a new one.
Error log
Initialized empty Git repository in /home/runner/work/jupyter-collaboration/jupyter-collaboration/.jupyter_releaser_checkout/.git/ fatal: couldn't find remote ref refs/pull/378/merge Traceback (most recent call last): File "/opt/hostedtoolcache/Python/3.11.10/x64/bin/jupyter-releaser", line 8, in sys.exit(main()) ^^^^^^ File "/opt/hostedtoolcache/Python/3.11.10/x64/lib/python3.11/site-packages/click/core.py", line 1157, in __call__ return self.main(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/hostedtoolcache/Python/3.11.10/x64/lib/python3.11/site-packages/click/core.py", line 1078, in main rv = self.invoke(ctx) ^^^^^^^^^^^^^^^^ File "/home/runner/work/_actions/jupyter-server/jupyter_releaser/v2/jupyter_releaser/cli.py", line 121, in invoke super().invoke(ctx) File "/opt/hostedtoolcache/Python/3.11.10/x64/lib/python3.11/site-packages/click/core.py", line 1688, in invoke return _process_result(sub_ctx.command.invoke(sub_ctx)) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/hostedtoolcache/Python/3.11.10/x64/lib/python3.11/site-packages/click/core.py", line 1434, in invoke return ctx.invoke(self.callback, **ctx.params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/hostedtoolcache/Python/3.11.10/x64/lib/python3.11/site-packages/click/core.py", line 783, in invoke return __callback(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/runner/work/_actions/jupyter-server/jupyter_releaser/v2/jupyter_releaser/cli.py", line 367, in prep_git lib.prep_git(ref, branch, repo, auth, username, git_url) File "/home/runner/work/_actions/jupyter-server/jupyter_releaser/v2/jupyter_releaser/lib.py", line 537, in prep_git util.run(f"{util.GIT_FETCH_CMD} +{ref}:{ref_alias}") File "/home/runner/work/_actions/jupyter-server/jupyter_releaser/v2/jupyter_releaser/util.py", line 94, in run raise e File "/home/runner/work/_actions/jupyter-server/jupyter_releaser/v2/jupyter_releaser/util.py", line 86, in run process = tee(cmd, **kwargs) ^^^^^^^^^^^^^^^^^^ File "/home/runner/work/_actions/jupyter-server/jupyter_releaser/v2/jupyter_releaser/tee.py", line 159, in run raise subprocess.CalledProcessError( subprocess.CalledProcessError: Command 'git fetch origin --filter=blob:none --quiet +refs/pull/378/merge:refs/pull/378/merge' returned non-zero exit status 128. Traceback (most recent call last): File "", line 198, in _run_module_as_main File "", line 88, in _run_code File "/home/runner/work/_actions/jupyter-server/jupyter_releaser/v2/jupyter_releaser/actions/prep_release.py", line 11, in run_action("jupyter-releaser prep-git") File "/home/runner/work/_actions/jupyter-server/jupyter_releaser/v2/jupyter_releaser/actions/common.py", line 25, in run_action _run(target, *args, **kwargs) File "/home/runner/work/_actions/jupyter-server/jupyter_releaser/v2/jupyter_releaser/util.py", line 94, in run raise e File "/home/runner/work/_actions/jupyter-server/jupyter_releaser/v2/jupyter_releaser/util.py", line 86, in run process = tee(cmd, **kwargs) ^^^^^^^^^^^^^^^^^^ File "/home/runner/work/_actions/jupyter-server/jupyter_releaser/v2/jupyter_releaser/tee.py", line 159, in run raise subprocess.CalledProcessError( subprocess.CalledProcessError: Command 'jupyter-releaser prep-git' returned non-zero exit status 1.
Reproduce
This seems to be random, so difficult to reproduce.