Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pull: ssh remote fails, error in asyncssh 2.19.0, missing arguments #10656

Open
sebastianbeyer opened this issue Dec 19, 2024 · 2 comments
Open
Labels
bug Did we break something? dependencies Pull requests that update a dependency file fs: ssh Related to the SSH filesystem p1-important Important, aka current backlog of things to do

Comments

@sebastianbeyer
Copy link

Bug Report

Description

When I try to do a dvc pull for a ssh remote, I do get the following error:

TypeError: SSHClientConfig.__init__() missing 2 required positional arguments: 'host' and 'port'

This happens when using asyncssh==2.19.0, with asyncssh==2.18.0 it does work.
So my guess is that something changed in asyncssh api.

Reproduce

  1. init dvc on one machine, add any testdata
    2 on another machine add the first machine as an ssh remote
  2. dvc pull

Expected

The data should be pulled.

Environment information

verbose output

2024-12-19 11:29:08,486 DEBUG: v3.58.0 (pip), CPython 3.11.4 on Linux-5.14.21-150500.55.49_13.0.56-cray_shasta_c-x86_64-with-glibc2.31
2024-12-19 11:29:08,486 DEBUG: command: /users/sbeyer/mambaforge/envs/snakemake/bin/dvc pull -v
Collecting                                                                                                           |0.00 [00:00,    ?entry/s]
2024-12-19 11:29:10,178 ERROR: failed to connect to ssh (/gpfs/scratch/ehpc01/ifs-inputs_dvc-remote/files/md5) - SSHClientConfig.__init__() missing 2 required positional arguments: 'host' and 'port'
Traceback (most recent call last):
  File "/pfs/lustrep2/users/sbeyer/mambaforge/envs/snakemake/lib/python3.11/site-packages/dvc_data/index/fetch.py", line 118, in fetch
    data.fs.exists(data.path)
  File "/pfs/lustrep2/users/sbeyer/mambaforge/envs/snakemake/lib/python3.11/site-packages/dvc_objects/fs/base.py", line 451, in exists
    return self.fs.exists(path)
           ^^^^^^^
  File "/pfs/lustrep2/users/sbeyer/mambaforge/envs/snakemake/lib/python3.11/site-packages/funcy/objects.py", line 47, in __get__
    return prop.__get__(instance, type)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/pfs/lustrep2/users/sbeyer/mambaforge/envs/snakemake/lib/python3.11/site-packages/funcy/objects.py", line 25, in __get__
    res = instance.__dict__[self.fget.__name__] = self.fget(instance)
                                                  ^^^^^^^^^^^^^^^^^^^
  File "/pfs/lustrep2/users/sbeyer/mambaforge/envs/snakemake/lib/python3.11/site-packages/dvc_ssh/__init__.py", line 126, in fs
    return _SSHFileSystem(**self.fs_args)
                            ^^^^^^^^^^^^
  File "/pfs/lustrep2/users/sbeyer/mambaforge/envs/snakemake/lib/python3.11/site-packages/funcy/objects.py", line 25, in __get__
    res = instance.__dict__[self.fget.__name__] = self.fget(instance)
                                                  ^^^^^^^^^^^^^^^^^^^
  File "/pfs/lustrep2/users/sbeyer/mambaforge/envs/snakemake/lib/python3.11/site-packages/dvc_objects/fs/base.py", line 90, in fs_args
    ret.update(self._prepare_credentials(**self._config))
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/pfs/lustrep2/users/sbeyer/mambaforge/envs/snakemake/lib/python3.11/site-packages/dvc_ssh/__init__.py", line 55, in _prepare_credentials
    user_ssh_config = parse_config(host=config["host"])
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/pfs/lustrep2/users/sbeyer/mambaforge/envs/snakemake/lib/python3.11/site-packages/sshfs/config.py", line 23, in parse_config
    return SSHClientConfig.load(
           ^^^^^^^^^^^^^^^^^^^^^
  File "/pfs/lustrep2/users/sbeyer/mambaforge/envs/snakemake/lib/python3.11/site-packages/asyncssh/config.py", line 433, in load
    config = cls(last_config, reload, canonical, final, *args)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: SSHClientConfig.__init__() missing 2 required positional arguments: 'host' and 'port'

Fetching
2024-12-19 11:29:10,312 ERROR: failed to pull data from the cloud - 96 files failed to download
Traceback (most recent call last):
  File "/pfs/lustrep2/users/sbeyer/mambaforge/envs/snakemake/lib/python3.11/site-packages/dvc/commands/data_sync.py", line 35, in run
    stats = self.repo.pull(
            ^^^^^^^^^^^^^^^
  File "/pfs/lustrep2/users/sbeyer/mambaforge/envs/snakemake/lib/python3.11/site-packages/dvc/repo/__init__.py", line 58, in wrapper
    return f(repo, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/pfs/lustrep2/users/sbeyer/mambaforge/envs/snakemake/lib/python3.11/site-packages/dvc/repo/pull.py", line 30, in pull
    processed_files_count = self.fetch(
                            ^^^^^^^^^^^
  File "/pfs/lustrep2/users/sbeyer/mambaforge/envs/snakemake/lib/python3.11/site-packages/dvc/repo/__init__.py", line 58, in wrapper
    return f(repo, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/pfs/lustrep2/users/sbeyer/mambaforge/envs/snakemake/lib/python3.11/site-packages/dvc/repo/fetch.py", line 200, in fetch
    raise DownloadError(failed_count)
dvc.exceptions.DownloadError: 96 files failed to download

2024-12-19 11:29:10,385 DEBUG: Analytics is enabled.
2024-12-19 11:29:10,644 DEBUG: Trying to spawn ['daemon', 'analytics', '/tmp/tmplwq32hb2', '-v']
2024-12-19 11:29:10,658 DEBUG: Spawned ['daemon', 'analytics', '/tmp/tmplwq32hb2', '-v'] with pid 67719

Output of dvc doctor:

DVC version: 3.58.0 (pip)

Platform: Python 3.11.4 on Linux-5.14.21-150500.55.49_13.0.56-cray_shasta_c-x86_64-with-glibc2.31
Subprojects:
dvc_data = 3.16.7
dvc_objects = 5.1.0
dvc_render = 1.0.2
dvc_task = 0.40.2
scmrepo = 3.3.9
Supports:
http (aiohttp = 3.11.10, aiohttp-retry = 2.9.1),
https (aiohttp = 3.11.10, aiohttp-retry = 2.9.1),
s3 (s3fs = 2024.10.0, boto3 = 1.35.36),
ssh (sshfs = 2024.9.0)
Config:
Global: /users/sbeyer/.config/dvc
System: /etc/xdg/dvc
Cache types: hardlink, symlink
Cache directory: lustre on:/lustrep3
Caches: local
Remotes: s3, ssh
Workspace directory: lustre on :/lustrep3
Repo: dvc, git
Repo.site_cache_dir: /var/tmp/dvc/repo/818a09880835c36dded81b0960402c9f

Additional Information (if any):

@shcheklein shcheklein added bug Did we break something? p1-important Important, aka current backlog of things to do fs: ssh Related to the SSH filesystem dependencies Pull requests that update a dependency file labels Dec 19, 2024
@shcheklein
Copy link
Member

Main research and discussion is happening here fsspec/sshfs#54 (comment)

@shcheklein
Copy link
Member

There is a PR to pin the version, but I'm looking into mitigating it in a different way. For now please install the previous version of the asyncssh or pin it directly in your project.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Did we break something? dependencies Pull requests that update a dependency file fs: ssh Related to the SSH filesystem p1-important Important, aka current backlog of things to do
Projects
None yet
Development

No branches or pull requests

2 participants