From d036962ff0a3e9d2a72ff81c0482800f9b1a28d0 Mon Sep 17 00:00:00 2001 From: "J.J. Allaire" Date: Sun, 22 Dec 2024 08:53:04 -0500 Subject: [PATCH] Revert "docker sandbox: introduce 120 second timeout on `docker compose cp` (#1036)" This reverts commit 6f6b8b2df5001fc39e9a287e9ec8627d732058d0. --- CHANGELOG.md | 1 - src/inspect_ai/util/_sandbox/docker/compose.py | 10 +--------- 2 files changed, 1 insertion(+), 10 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4c1fa04aa..f2dfcfab7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,7 +2,6 @@ ## Unreleased -- Docker sandbox: Introduce 120 second timeout on `docker compose cp`. - Bugfix: Fix failure to fully clone samples that have message lists as input. ## v0.3.53 (20 December 2024) diff --git a/src/inspect_ai/util/_sandbox/docker/compose.py b/src/inspect_ai/util/_sandbox/docker/compose.py index 58d86f720..3b1b39cc1 100644 --- a/src/inspect_ai/util/_sandbox/docker/compose.py +++ b/src/inspect_ai/util/_sandbox/docker/compose.py @@ -70,23 +70,15 @@ async def compose_down(project: ComposeProject, quiet: bool = True) -> None: ) -# NOTE: We have observed at least one instance of docker compose cp hanging -# indefinitely (which makes the task/sample hang indefinitely). We introduce -# a default timeout so that this instead fails with a clear TimeoutError async def compose_cp( src: str, dest: str, project: ComposeProject, cwd: str | Path | None = None, output_limit: int | None = None, - timeout: int | None = 120, ) -> None: result = await compose_command( - ["cp", "--", src, dest], - project=project, - cwd=cwd, - output_limit=output_limit, - timeout=timeout, + ["cp", "--", src, dest], project=project, cwd=cwd, output_limit=output_limit ) if not result.success: msg = f"Failed to copy file from '{src}' to '{dest}': {result.stderr}"