exp push: HangupException when attempting to push an experiment to a codecommit repo
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 35/100
Research direction
Start with dvc/repo/experiments/push.py, especially _push, then inspect scmrepo's dulwich push_refspecs path shown in the traceback. Reproduce the dvc exp push command against the CodeCommit URL and compare it with the fully resolved ref push. Done means experiment pushes to CodeCommit without HangupException and the existing experiment list and pull behavior remains functional.
Written by the indexing model from the issue text.
Description
Bug Report
Description
I have a codecommit repo and the remote url follows the form https://git-codecommit.<region>.amazonaws.com/v1/repos/<reponame>
A dvc exp push https://git-codecommit.<region>.amazonaws.com/v1/repos/<reponame> balky-chin -vv results in the error and traceack below.
I can workaround this by pushing the fully resolved experiment ref given in the debug using git
git push origin refs/exps/21/b9f0518f32301a128f5c3927fed1c308401b08/balky-chin
After that, commands like dvc exp list and dvc exp pull work fine against the remote.
Not sure what's changed since I helped resolve #9007 and I think its exactly the same scenario...
2023-05-07 20:12:35,563 DEBUG: v2.56.0 (pip), CPython 3.9.16 on Linux-5.10.76-linuxkit-x86_64-with-glibc2.31
2023-05-07 20:12:35,563 DEBUG: command: /opt/conda/bin/dvc exp push https://git-codecommit.eu-west-2.amazonaws.com/v1/repos/example-devbox-project balky-chin -vv
2023-05-07 20:12:35,564 TRACE: Namespace(cprofile=False, yappi=False, yappi_separate_threads=False, viztracer=False, viztracer_depth=None, viztracer_async=False, cprofile_dump=None, pdb=False, instrument=False, instrument_open=False, show_stack=False, quiet=0, verbose=2, cd='.', cmd='push', all_commits=False, rev=None, num=1, force=False, push_cache=True, dvc_remote=None, jobs=None, run_cache=False, git_remote='https://git-codecommit.eu-west-2.amazonaws.com/v1/repos/example-devbox-project', experiment=['balky-chin'], func=<class 'dvc.commands.experiments.push.CmdExperimentsPush'>, parser=DvcParser(prog='dvc', usage=None, description='Data Version Control', formatter_class=<class 'argparse.RawTextHelpFormatter'>, conflict_handler='error', add_help=False))
2023-05-07 20:12:35,851 DEBUG: git push experiment ['refs/exps/21/b9f0518f32301a128f5c3927fed1c308401b08/balky-chin:refs/exps/21/b9f0518f32301a128f5c3927fed1c308401b08/balky-chin'] -> 'https://git-codecommit.eu-west-2.amazonaws.com/v1/repos/example-devbox-project'
2023-05-07 20:12:38,325 ERROR: unexpected error - The remote server unexpectedly closed the connection.
Traceback (most recent call last):
File "/opt/conda/lib/python3.9/site-packages/dvc/cli/__init__.py", line 210, in main
ret = cmd.do_run()
File "/opt/conda/lib/python3.9/site-packages/dvc/cli/command.py", line 26, in do_run
return self.run()
File "/opt/conda/lib/python3.9/site-packages/dvc/commands/experiments/push.py", line 65, in run
result = self.repo.experiments.push(
File "/opt/conda/lib/python3.9/site-packages/dvc/repo/experiments/__init__.py", line 494, in push
return push(self.repo, *args, **kwargs)
File "/opt/conda/lib/python3.9/site-packages/dvc/repo/__init__.py", line 65, in wrapper
return f(repo, *args, **kwargs)
File "/opt/conda/lib/python3.9/site-packages/dvc/repo/scm_context.py", line 151, in run
return method(repo, *args, **kw)
File "/opt/conda/lib/python3.9/site-packages/dvc/repo/experiments/push.py", line 117, in push
push_result = _push(repo, git_remote, exp_ref_set, force)
File "/opt/conda/lib/python3.9/site-packages/dvc/repo/experiments/push.py", line 159, in _push
results: Mapping[str, SyncStatus] = repo.scm.push_refspecs(
File "/opt/conda/lib/python3.9/site-packages/scmrepo/git/__init__.py", line 286, in _backend_func
result = func(*args, **kwargs)
File "/opt/conda/lib/python3.9/site-packages/scmrepo/git/backend/dulwich/__init__.py", line 580, in push_refspecs
result = client.send_pack(
File "/opt/conda/lib/python3.9/site-packages/dulwich/client.py", line 2054, in send_pack
ref_status = self._handle_receive_pack_tail(
File "/opt/conda/lib/python3.9/site-packages/dulwich/client.py", line 881, in _handle_receive_pack_tail
for chan, data in _read_side_band64k_data(proto.read_pkt_seq()):
File "/opt/conda/lib/python3.9/site-packages/dulwich/client.py", line 458, in _read_side_band64k_data
for pkt in pkt_seq:
File "/opt/conda/lib/python3.9/site-packages/dulwich/protocol.py", line 271, in read_pkt_seq
pkt = self.read_pkt_line()
File "/opt/conda/lib/python3.9/site-packages/dulwich/protocol.py", line 214, in read_pkt_line
raise HangupException()
dulwich.errors.HangupException: The remote server unexpectedly closed the connection.
Environment information
DVC version: 2.56.0 (pip)
-------------------------
Platform: Python 3.9.16 on Linux-5.10.76-linuxkit-x86_64-with-glibc2.31
Subprojects:
dvc_data = 0.47.1
dvc_objects = 0.21.1
dvc_render = 0.3.1
dvc_task = 0.2.1
scmrepo = 1.0.1
Supports:
http (aiohttp = 3.8.4, aiohttp-retry = 2.8.3),
https (aiohttp = 3.8.4, aiohttp-retry = 2.8.3),
s3 (s3fs = 2023.4.0, boto3 = 1.26.76)
Config:
Global: /home/mambauser/.config/dvc
System: /etc/xdg/dvc
Cache types: symlink
Cache directory: fuse.grpcfuse on grpcfuse
Caches: local
Remotes: s3
Workspace directory: fuse.grpcfuse on grpcfuse
Repo: dvc, git
Repo.site_cache_dir: /var/tmp/dvc/repo/d5d9f9155688caf9fa42340dcf3f255e
- Dominant language
- Python
- Stars
- 15.9k
- Forks
- 1.3k
- PR merge metrics
- No merged PRs in 30d
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from treeverse/dvc
-
A bare `!` line in .dvcignore kills every command with `unexpected error` (git accepts it silently) Open
Difficulty 2/5 1-3 hours Newbie friendliness 90/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
-
Typo in the docs Open
Difficulty 1/5 Under an hour Newbie friendliness 82/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
Difficulty 3/5 1-2 days Newbie friendliness 55/100
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
bancolombia/sentinel#23 ·
-
test md OpenCI
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
-
integration:quickjs org:external priority:backlog topic:code-interpreter topic:middleware type:feature
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
langchain-ai/deepagents#6450 ·
-
bug client
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100