Skip to content

Commit

Permalink
add comment on ignore exit code in compose_up
Browse files Browse the repository at this point in the history
  • Loading branch information
jjallaire committed Jan 13, 2025
1 parent 30ee653 commit ef66a83
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/inspect_ai/util/_sandbox/docker/compose.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,12 @@


async def compose_up(project: ComposeProject) -> None:
# Start the environment
result = await compose_command(
# Start the environment. Note that we don't check the result because docker will
# return a non-zero exit code for services that exit (even successfully) when
# passing the --wait flag (see https://github.com/docker/compose/issues/10596).
# In practice, we will catch any errors when calling compose_check_running()
# immediately after we call compose_up().
await compose_command(
["up", "--detach", "--wait", "--wait-timeout", COMPOSE_WAIT],
project=project,
# wait up to 5 minutes for container to go up (compose wait + 3 minutes)
Expand Down

0 comments on commit ef66a83

Please sign in to comment.