Commit 68bbdec
authored
Use Docker Compose v2 (
* Use Docker Compose v2 (`docker compose`) in the compose log collector
The compose collector shells out to `docker-compose -f ... -p ... ps -q ...` (Compose
v1) to locate containers for log collection. GitHub-hosted `ubuntu-24.04` runners no
longer ship the standalone `docker-compose` (v1) binary, so collection fails with
`docker-compose: command not found` on every failed e2e (setup already uses Compose v2
via testcontainers-go, so only the collector was still on v1).
Switch `ComposeCommand` from `docker-compose` to `docker compose`. The command is run
via `bash -ec`, so the two-word v2 plugin invocation works as-is, and v2 accepts the
same `-f / -p / ps -q` flags.
Validated locally with a compose e2e (nginx): with `docker-compose` v1 absent (and with
a failing `docker-compose` stub shadowing PATH), `e2e run` completes green and the
collector gathers container files via `docker compose` v2 without ever invoking
`docker-compose`.
* Add CI coverage for the compose log collector
infra-e2e's own e2e (`test/e2e/e2e.yaml`) runs on `ubuntu-latest` (which ships only
Docker Compose v2) but never exercised the compose log collector, so the v1->v2
breakage slipped through CI and the prior fix had no regression guard.
Add a `cleanup.collect` config (httpbin / /etc/hostname) and a verify case that runs
`e2e collect` against the already-running stack and asserts a container file was
gathered. The collector now runs in CI on a v1-less runner, proving it works via
`docker compose` v2 and failing the build if it ever regresses to `docker-compose` v1.
Validated locally: `e2e collect` gathers /etc/hostname from the httpbin service and the
verify case reports `1 passed`.docker compose) in the compose log collector (#148)1 parent 0d91769 commit 68bbdec
3 files changed
Lines changed: 40 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
23 | | - | |
| 23 | + | |
24 | 24 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
27 | 38 | | |
28 | 39 | | |
29 | 40 | | |
| |||
56 | 67 | | |
57 | 68 | | |
58 | 69 | | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
0 commit comments