Skip to content

SshTransport: fix deprecation warnings #7113

@mbercx

Description

@mbercx

When running with core.ssh, I'm getting a whole bunch of these:

/Users/mbercx/project/defect/git/aiida-core/src/aiida/transports/plugins/ssh.py:674: AiidaDeprecationWarning: `getcwd()` is deprecated and will be removed in the next major version. Use absolute paths instead. (this will be removed in v3)
  warn_deprecation(

They also show up every time I test the computer:

❯ verdi computer test pawsey-ssh
Report: Testing computer<pawsey-ssh> for user<aiida@localhost>...
* Opening connection... [OK]
* Checking for spurious output... /Users/mbercx/project/defect/git/aiida-core/src/aiida/transports/plugins/ssh.py:674: AiidaDeprecationWarning: `getcwd()` is deprecated and will be removed in the next major version. Use absolute paths instead. (this will be removed in v3)
  warn_deprecation(
[OK]

And when submitting a lot of workflows my daemon logs are absolute flooded with these, making it hard to find actual issues.

@khsrali I know we might remove core.ssh in favor of core.ssh_async, but right now core.ssh_async is not yet battle-tested, and a lot of users might still have configurations that rely on core.ssh. If it's not too much work, I'd adapt the SshTransport to avoid using deprecated methods.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions