Skip to content

🐛 OpenSSH backend: ignore benign path check warnings#7313

Open
officialasishkumar wants to merge 1 commit intoaiidateam:mainfrom
officialasishkumar:fix/7311-openssh-path-exists-warnings
Open

🐛 OpenSSH backend: ignore benign path check warnings#7313
officialasishkumar wants to merge 1 commit intoaiidateam:mainfrom
officialasishkumar:fix/7311-openssh-path-exists-warnings

Conversation

@officialasishkumar
Copy link
Copy Markdown

Fixes #7311

_OpenSSH.path_exists now treats the test -e return code as the source of truth: 0 means the path exists, 1 means it does not. Any stderr from those expected outcomes is logged for debugging instead of being raised, which avoids failing on harmless OpenSSH host-key warnings. Unexpected return codes still raise with the stderr context.

Validation:

  • pytest tests/transports/test_asyncssh_plugin.py -k path_exists
  • python3 -m compileall -q src/aiida/transports/plugins/async_backend.py tests/transports/test_asyncssh_plugin.py
  • ruff check --ignore PLC0415,RUF059 src/aiida/transports/plugins/async_backend.py tests/transports/test_asyncssh_plugin.py

Treat the expected exit codes from the remote test command as the authoritative exists/not-exists result, even when OpenSSH writes harmless warnings to stderr. Unexpected exit codes still raise with the stderr context.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

OpenSSH backend raises OSError for SSH host key warning messages

1 participant