gabrieldemarmiesse / python-on-whales

An awesome Python wrapper for an awesome Docker CLI!
MIT License
537 stars 100 forks source link

feat: Add `--wait-timeout` option for `docker.compose.up` #573

Closed Taragolis closed 4 months ago

Taragolis commented 5 months ago

This PR add support for wait timeout, https://docs.docker.com/reference/cli/docker/compose/up/#options

--wait-timeout      Maximum duration to wait for the project to be running|healthy
gabrieldemarmiesse commented 5 months ago

I seems that the version of docker compose we use in the CI is not recent enough. Maybe we should update it?

Taragolis commented 5 months ago

Yeah it added in v2.17.0, let me check locally that compose tests pass in that version

Taragolis commented 5 months ago

I've check it locally with 2.17.0 and 2.17.2 and two tests was failed

================================================================== short test summary info ===================================================================
FAILED tests/python_on_whales/components/test_compose.py::test_project_directory_env_files - python_on_whales.exceptions.DockerException: The docker command executed was `/usr/bin/docker compose --file /home/taragolis/Projects/common/python-on-wh...
FAILED tests/python_on_whales/components/test_compose.py::test_compose_logs_follow - assert 1 >= 5
========================================================== 2 failed, 71 passed in 312.91s (0:05:12) ==========================================================
Taragolis commented 5 months ago

I could have a look on this tests and try to adopt tests to the newer version of docker-compose. Any preference to the target version of docker-compose?

gabrieldemarmiesse commented 5 months ago

The latest one is fine by me

gabrieldemarmiesse commented 5 months ago

@MisterOwlPT updated the compose version in the CI, let's see if that fixes the tests here

Edit: Noice

gabrieldemarmiesse commented 4 months ago

dang this PR is cursed