Skip to content

Commit 2f0e210

Browse files
committed
Revert "fix(Runtime): Wait for container to start up (All-Hands-AI#7548)"
This reverts commit 4e69986.
1 parent 91914d6 commit 2f0e210

File tree

1 file changed

+1
-11
lines changed

1 file changed

+1
-11
lines changed

openhands/runtime/impl/docker/docker_runtime.py

+1-11
Original file line numberDiff line numberDiff line change
@@ -37,16 +37,6 @@
3737
APP_PORT_RANGE_2 = (55000, 59999)
3838

3939

40-
def _is_retryable_wait_until_alive_error(exception):
41-
if isinstance(exception, tenacity.RetryError):
42-
cause = exception.last_attempt.exception()
43-
return _is_retryable_wait_until_alive_error(cause)
44-
45-
return isinstance(
46-
exception, (ConnectionError, httpx.NetworkError, httpx.RemoteProtocolError)
47-
)
48-
49-
5040
class DockerRuntime(ActionExecutionClient):
5141
"""This runtime will subscribe the event stream.
5242
@@ -365,7 +355,7 @@ def _attach_to_container(self):
365355

366356
@tenacity.retry(
367357
stop=tenacity.stop_after_delay(120) | stop_if_should_exit(),
368-
retry=tenacity.retry_if_exception(_is_retryable_wait_until_alive_error),
358+
retry=tenacity.retry_if_exception_type((ConnectionError, httpx.NetworkError)),
369359
reraise=True,
370360
wait=tenacity.wait_fixed(2),
371361
)

0 commit comments

Comments
 (0)