Skip to content

Commit

Permalink
Revert "docker sandbox: introduce 120 second timeout on `docker compo…
Browse files Browse the repository at this point in the history
…se cp` (#1036)"

This reverts commit 6f6b8b2.
  • Loading branch information
jjallaire committed Dec 22, 2024
1 parent 6f6b8b2 commit d036962
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 10 deletions.
1 change: 0 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
10 changes: 1 addition & 9 deletions src/inspect_ai/util/_sandbox/docker/compose.py
Original file line number Diff line number Diff line change
Expand Up @@ -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}"
Expand Down

0 comments on commit d036962

Please sign in to comment.