Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(fix) Update logs after run_action (EventStreamRuntime) #3870

Merged
merged 1 commit into from
Sep 15, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion openhands/runtime/client/runtime.py
Original file line number Diff line number Diff line change
Expand Up @@ -426,7 +426,6 @@ def run_action(self, action: Action) -> Observation:
output = response.json()
obs = observation_from_dict(output)
obs._cause = action.id # type: ignore[attr-defined]
return obs
else:
error_message = response.text
logger.error(f'Error from server: {error_message}')
Expand All @@ -437,6 +436,8 @@ def run_action(self, action: Action) -> Observation:
except Exception as e:
logger.error(f'Error during command execution: {e}')
obs = ErrorObservation(f'Command execution failed: {str(e)}')
# Refresh docker logs
self._wait_until_alive()
return obs

def run(self, action: CmdRunAction) -> Observation:
Expand Down