Log restart reason if runtime reports it (#6455)

This commit is contained in:
Ray Myers 2025-01-25 00:20:18 -06:00 committed by GitHub
parent 93753ac2e0
commit e619929909
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -306,6 +306,12 @@ class RemoteRuntime(ActionExecutionClient):
assert 'pod_status' in runtime_data
pod_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.