From 04d7354501a25006fde26543b1da7ab4a5fdacd5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E0=AE=AE=E0=AE=A9=E0=AF=8B=E0=AE=9C=E0=AF=8D=E0=AE=95?= =?UTF-8?q?=E0=AF=81=E0=AE=AE=E0=AE=BE=E0=AE=B0=E0=AF=8D=20=E0=AE=AA?= =?UTF-8?q?=E0=AE=B4=E0=AE=A9=E0=AE=BF=E0=AE=9A=E0=AF=8D=E0=AE=9A=E0=AE=BE?= =?UTF-8?q?=E0=AE=AE=E0=AE=BF?= Date: Sat, 1 Jun 2024 11:40:22 +0530 Subject: [PATCH] Detailed logs for ssh_box (#2173) --- opendevin/runtime/docker/ssh_box.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/opendevin/runtime/docker/ssh_box.py b/opendevin/runtime/docker/ssh_box.py index c4ea4aa2a4..75191139ae 100644 --- a/opendevin/runtime/docker/ssh_box.py +++ b/opendevin/runtime/docker/ssh_box.py @@ -422,7 +422,9 @@ class DockerSSHBox(Sandbox): prev_output: str = '', ignore_last_output: bool = False, ) -> tuple[int, str]: - logger.exception('Command timed out, killing process...', exc_info=False) + logger.exception( + f'Command "{cmd}" timed out, killing process...', exc_info=False + ) # send a SIGINT to the process self.ssh.sendintr() self.ssh.prompt() @@ -431,7 +433,7 @@ class DockerSSHBox(Sandbox): command_output += '\n' + self.ssh.before return ( -1, - f'Command: "{cmd}" timed out. Sending SIGINT to the process: {command_output}', + f'Command: "{cmd}" timed out. Sent SIGINT to the process: {command_output}', ) def execute( @@ -455,7 +457,6 @@ class DockerSSHBox(Sandbox): return 0, SSHExecCancellableStream(self.ssh, cmd, self.timeout) success = self.ssh.prompt(timeout=timeout) if not success: - logger.exception('Command timed out, killing process...', exc_info=False) return self._send_interrupt(cmd) command_output = self.ssh.before