π OpenHands: AI-Driven Development
Log restart reason if runtime reports it (#6455)
Ray Myerse6199299090f
diff --git a/openhands/runtime/impl/remote/remote_runtime.py b/openhands/runtime/impl/remote/remote_runtime.pyindex 79dfd3026d..f0a9a7fb35 100644--- a/openhands/runtime/impl/remote/remote_runtime.py+++ b/openhands/runtime/impl/remote/remote_runtime.py@@ -306,6 +306,12 @@ class RemoteRuntime(ActionExecutionClient):assert 'pod_status' in runtime_datapod_status = runtime_data['pod_status'].lower()self.log('debug', f'Pod status: {pod_status}')+ restart_count = runtime_data.get('restart_count', 0)+ if restart_count != 0:+ restart_reasons = runtime_data.get('restart_reasons')+ self.log(+ 'debug', f'Pod restarts: {restart_count}, reasons: {restart_reasons}'+ )# FIXME: We should fix it at the backend of /start endpoint, make sure# the pod is created before returning the response.