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

Increase timeout and enhance error logs in lean live stop command #371

Merged
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
4 changes: 2 additions & 2 deletions lean/components/docker/docker_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -456,7 +456,7 @@ def write_to_file(self, docker_container_name: str, docker_file: Path, data: Dic
except Exception as e:
raise ValueError(f"Failed to write to {docker_file.name}: {e}")

def read_from_file(self, docker_container_name: str, docker_file: Path, interval=1, timeout=30) -> Dict[str,Any]:
def read_from_file(self, docker_container_name: str, docker_file: Path, interval=1, timeout=60) -> Dict[str,Any]:
"""Read data from file in docker.

Args:
Expand Down Expand Up @@ -499,7 +499,7 @@ def read_from_file(self, docker_container_name: str, docker_file: Path, interval
if not success:
error_message = "Rejected by Lean. Possible arguments error. Please check your logs and try again."
if not success and not error_message:
error_message = f"Failed to read result from docker file {docker_file.name} within {timeout} seconds"
error_message = f"Failed to read result from docker file {docker_file.name} within {timeout} seconds. This could be due to an action taking longer than expected. Run 'docker logs {docker_container_name}' for more information."

return {
"error": error_message,
Expand Down