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

Release v2.5.2 #6457

Merged
merged 2 commits into from
Jun 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Changelog

## v2.5.2 - 2024-06-06

### Fixes
- `SshTransport`: Add channel timeout as argument to `exec_command_wait_bytes` (#6452) [[0c00815b1]](https://github.com/aiidateam/aiida-core/commit/0c00815b19e0d7b5496c577d62a32d2a5896f347)


## v2.5.1 - 2024-01-31

Expand Down
2 changes: 1 addition & 1 deletion src/aiida/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
'For further information please visit http://www.aiida.net/. All rights reserved.'
)
__license__ = 'MIT license, see LICENSE.txt file.'
__version__ = '2.5.1'
__version__ = '2.5.2'
__authors__ = 'The AiiDA team.'
__paper__ = (
'S. P. Huber et al., "AiiDA 1.0, a scalable computational infrastructure for automated reproducible workflows and '
Expand Down
7 changes: 4 additions & 3 deletions src/aiida/transports/plugins/ssh.py
Original file line number Diff line number Diff line change
Expand Up @@ -1317,7 +1317,7 @@ def _exec_command_internal(self, command, combine_stderr=False, bufsize=-1):

return stdin, stdout, stderr, channel

def exec_command_wait_bytes(self, command, stdin=None, combine_stderr=False, bufsize=-1):
def exec_command_wait_bytes(self, command, stdin=None, combine_stderr=False, bufsize=-1, timeout=0.01):
"""Executes the specified command and waits for it to finish.

:param command: the command to execute
Expand All @@ -1326,6 +1326,7 @@ def exec_command_wait_bytes(self, command, stdin=None, combine_stderr=False, buf
:param combine_stderr: (optional, default=False) see docstring of
self._exec_command_internal()
:param bufsize: same meaning of paramiko.
:param timeout: ssh channel timeout for stdout, stderr.

:return: a tuple with (return_value, stdout, stderr) where stdout and stderr
are both bytes and the return_value is an int.
Expand Down Expand Up @@ -1373,8 +1374,8 @@ def exec_command_wait_bytes(self, command, stdin=None, combine_stderr=False, buf
# if compression is enabled).
# It's important to mention that, for speed benchmarks, it's important to disable compression
# in the SSH transport settings, as it will cap the max speed.
stdout.channel.settimeout(0.01)
stderr.channel.settimeout(0.01) # Maybe redundant, as this could be the same channel.
stdout.channel.settimeout(timeout)
stderr.channel.settimeout(timeout) # Maybe redundant, as this could be the same channel.

while True:
chunk_exists = False
Expand Down
Loading