diff --git a/CHANGELOG.md b/CHANGELOG.md index 36ed67e2d8..8a507c201c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 diff --git a/src/aiida/__init__.py b/src/aiida/__init__.py index 90462fba09..c4599b3e94 100644 --- a/src/aiida/__init__.py +++ b/src/aiida/__init__.py @@ -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 ' diff --git a/src/aiida/transports/plugins/ssh.py b/src/aiida/transports/plugins/ssh.py index e70b383876..7b28b7dde7 100644 --- a/src/aiida/transports/plugins/ssh.py +++ b/src/aiida/transports/plugins/ssh.py @@ -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 @@ -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. @@ -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