diff --git a/.github/workflows/test-warehouse.yml b/.github/workflows/test-warehouse.yml index 31ff7c3f2..bcb03e341 100644 --- a/.github/workflows/test-warehouse.yml +++ b/.github/workflows/test-warehouse.yml @@ -90,7 +90,13 @@ jobs: - name: Start Dremio if: inputs.warehouse-type == 'dremio' working-directory: ${{ env.TESTS_DIR }} - run: docker compose -f docker-compose-dremio.yml up -d + run: | + docker compose -f docker-compose-dremio.yml up -d + # Wait for Dremio to be healthy (one-shot containers like + # minio-setup exit immediately, so --wait would fail). + echo "Waiting for Dremio to become healthy..." + timeout 180 bash -c 'until [ "$(docker inspect -f {{.State.Health.Status}} dremio 2>/dev/null)" = "healthy" ]; do sleep 5; done' + echo "Dremio is healthy." - name: Setup Python uses: actions/setup-python@v6 diff --git a/integration_tests/docker-compose-dremio.yml b/integration_tests/docker-compose-dremio.yml index 4ea82c5e9..1799937c9 100644 --- a/integration_tests/docker-compose-dremio.yml +++ b/integration_tests/docker-compose-dremio.yml @@ -65,12 +65,19 @@ services: - dremio_data:/opt/dremio/data:rw # Workaround for permission issues in podman user: "0" + healthcheck: + test: ["CMD-SHELL", "curl -sf http://localhost:9047 || exit 1"] + interval: 5s + timeout: 5s + retries: 30 + start_period: 15s dremio-setup: image: alpine:latest container_name: dremio-setup depends_on: - - dremio + dremio: + condition: service_healthy volumes: - ./docker/dremio/dremio-setup.sh:/dremio-setup.sh command: sh /dremio-setup.sh