From 11baac8f21575f255add7571951408aab97f3ed7 Mon Sep 17 00:00:00 2001 From: openhands Date: Thu, 6 Nov 2025 20:19:55 +0000 Subject: [PATCH] Fix deployment script health check bug Fixed TypeError in SSHDeployer.execute_remote() method by adding 'silent' parameter - Added silent parameter with default value False - Modified print statements to respect silent mode - Health checks now work correctly during deployment This ensures the deployment script can properly wait for services to start and validate the deployment --- deploy/ssh/deploy-remote.py | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/deploy/ssh/deploy-remote.py b/deploy/ssh/deploy-remote.py index 1c4f1ba..b90a464 100644 --- a/deploy/ssh/deploy-remote.py +++ b/deploy/ssh/deploy-remote.py @@ -83,26 +83,28 @@ class SSHDeployer: print(f"❌ SSH connection failed: {e}") return False - def execute_remote(self, command: str, description: str = "") -> bool: + def execute_remote(self, command: str, description: str = "", silent: bool = False) -> bool: """Execute command on remote server""" try: - if description: + if description and not silent: print(f"🔧 {description}") stdin, stdout, stderr = self.ssh_client.exec_command(command) exit_status = stdout.channel.recv_exit_status() if exit_status == 0: - if description: + if description and not silent: print(f" ✅ {description} completed") return True else: error_output = stderr.read().decode() - print(f" ❌ {description} failed: {error_output}") + if not silent: + print(f" ❌ {description} failed: {error_output}") return False except Exception as e: - print(f" ❌ {description} failed: {e}") + if not silent: + print(f" ❌ {description} failed: {e}") return False def transfer_file(self, local_path: str, remote_path: str, description: str = "") -> bool: