Commit 530f997
feat: migrate to testcontainers-go v0.42.0 and upgrade dependencies (#146)
* feat: migrate to testcontainers-go v0.42.0 and upgrade all major dependencies
- Delete compose_provider.go (601 lines) — custom DockerContainer/DockerProvider
re-implementation replaced by native testcontainers-go APIs
- Delete compose_listener.go (85 lines) — Docker event listener no longer needed;
containers are accessible after stack.Up() via stack.ServiceContainer()
- Rewrite compose.go to use compose.NewDockerComposeWith + stack.Up/ServiceContainer
- Rewrite cleanup/compose.go to use stack.Down
- Upgrade testcontainers-go v0.11.1 → v0.42.0
- Upgrade docker/docker v20.10.7 → v28.5.2
- Upgrade k8s.io/* v0.22.2 → v0.35.3
- Upgrade sigs.k8s.io/kind v0.27.0 → v0.31.0
- Upgrade spf13/cobra v1.8.0 → v1.10.2
- Remove docker-compose v1 binary install from CI (v0.42.0 uses Docker Compose v2 plugin)
- Update action.yaml Go version to 1.26
Closes #139
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* chore: add multi-platform CI build matrix and CGO_ENABLED support
Split Build workflow into lint-and-test + build-platform (ubuntu/windows/macos)
matrix jobs. Enable CGO for native builds. Update Dockerfile with build-essential
for CGO. Change `make build` to build for current OS only (CI matrix handles
cross-platform).
Based on #139
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* fix: remove compose.Wait(true) to avoid requiring all containers healthy
compose.Wait(true) maps to `docker compose up --wait` which requires ALL
containers to remain running and healthy. This is too strict for e2e tests
where some containers may not have healthchecks or may exit after init.
Port readiness is already handled by WaitForService() with per-port
wait strategies.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* chore: remove containerd image store disable workaround
No longer needed — testcontainers-go v0.42.0 uses Docker Compose v2
plugin which fully supports the containerd image store.
Reverts the workaround added in 8c21e43 (#140).
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* fix: add manual port waiting after compose up
WaitForService strategies only execute when compose.Wait(true) is passed,
but compose.Wait(true) is too strict (requires all containers healthy).
Instead, manually wait for each port via TCP dial after Up() returns,
matching the old code's behavior of waitPortUntilReady().
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* fix: restore DOCKER_API_VERSION negotiation in action.yaml
Docker SDK v28.5.2 defaults to API v1.51, but GitHub Actions runners
may only support up to v1.48. Set DOCKER_API_VERSION to the daemon's
supported version to ensure compatibility.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* fix: add logging to port waiting and try immediately before polling
Add INFO-level logs for port wait start/completion and DEBUG-level for
retry attempts. Also try connecting immediately before the first ticker
interval to avoid unnecessary 500ms delay when ports are already ready.
Log when a service has no ports to wait for.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* fix: wait for Docker healthcheck before port readiness check
After stack.Up(), wait for each container's Docker healthcheck to pass
(if defined) before doing TCP port checks. This matches the old behavior
where docker-compose up -d would respect depends_on: condition: service_healthy.
Also restored internal container port check (/proc/net/tcp + nc + /dev/tcp)
from the old WaitPort implementation to align with original behavior.
The wait sequence is now:
1. stack.Up(ctx) — start containers
2. waitForHealthy — poll Docker health status until healthy (if healthcheck defined)
3. waitForPort — external TCP dial + internal container check
4. Export env vars
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* fix: only wait for healthcheck on services with ports
The old code only waited for services that had ports: in docker-compose.yml.
Services without ports were completely skipped. The healthcheck wait was
incorrectly running on ALL services, causing timeouts on services like
init containers or senders whose healthchecks depend on other services.
Now: services without ports get log streaming only. Services with ports
get healthcheck wait + port wait + env export (matching old behavior).
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* fix: remove healthcheck waiting, use only TCP+internal port check
The old code never checked Docker healthcheck status. It only did
TCP dial + internal /proc/net/tcp check. Many compose files use
healthchecks with tools (nc) not available in the container image,
causing Docker to mark containers as unhealthy even when the
application is running fine.
Remove waitForHealthy entirely to match old behavior exactly:
port-level waiting only, no Docker healthcheck dependency.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* fix: restore build target to build all platforms for release
The build target must build all platforms (windows/linux/darwin) because
release-bin depends on it. Each platform build uses CGO_FLAG to enable
CGO only for native builds.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* fix: build only current platform per CI matrix runner
Each matrix runner (ubuntu/windows/macos) now builds only its own
platform instead of all three redundantly. The `make build` target
is preserved for release which needs all platforms.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* ci: simplify build matrix by moving OS-to-target mapping into matrix include
---------
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-authored-by: kezhenxu94 <kezhenxu94@apache.org>1 parent ef073ad commit 530f997
13 files changed
Lines changed: 989 additions & 2184 deletions
File tree
- .github/workflows
- internal
- components
- cleanup
- setup
- util
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | | - | |
| 8 | + | |
9 | 9 | | |
10 | | - | |
| 10 | + | |
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
20 | | - | |
21 | 20 | | |
22 | 21 | | |
23 | 22 | | |
24 | 23 | | |
25 | 24 | | |
26 | | - | |
27 | 25 | | |
28 | | - | |
29 | | - | |
| 26 | + | |
| 27 | + | |
30 | 28 | | |
31 | 29 | | |
32 | 30 | | |
| |||
36 | 34 | | |
37 | 35 | | |
38 | 36 | | |
39 | | - | |
40 | 37 | | |
41 | 38 | | |
42 | | - | |
43 | 39 | | |
44 | 40 | | |
45 | 41 | | |
46 | 42 | | |
47 | | - | |
48 | 43 | | |
49 | 44 | | |
50 | | - | |
51 | 45 | | |
52 | | - | |
53 | | - | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
54 | 69 | | |
55 | | - | |
56 | | - | |
| 70 | + | |
57 | 71 | | |
| 72 | + | |
58 | 73 | | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
47 | | - | |
48 | | - | |
49 | | - | |
50 | | - | |
51 | | - | |
52 | | - | |
53 | | - | |
54 | | - | |
55 | | - | |
56 | | - | |
| 47 | + | |
57 | 48 | | |
58 | 49 | | |
59 | 50 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | | - | |
| 8 | + | |
9 | 9 | | |
10 | | - | |
| 10 | + | |
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
25 | | - | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
26 | 29 | | |
27 | 30 | | |
28 | 31 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
28 | 32 | | |
29 | 33 | | |
30 | 34 | | |
| |||
57 | 61 | | |
58 | 62 | | |
59 | 63 | | |
60 | | - | |
| 64 | + | |
61 | 65 | | |
62 | 66 | | |
63 | 67 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
34 | | - | |
| 34 | + | |
35 | 35 | | |
36 | 36 | | |
37 | | - | |
38 | | - | |
39 | | - | |
40 | | - | |
41 | | - | |
42 | | - | |
43 | | - | |
44 | | - | |
45 | | - | |
46 | | - | |
47 | | - | |
48 | | - | |
49 | 37 | | |
50 | | - | |
51 | | - | |
52 | | - | |
53 | | - | |
54 | | - | |
55 | | - | |
56 | | - | |
57 | | - | |
58 | | - | |
59 | 38 | | |
60 | | - | |
| 39 | + | |
61 | 40 | | |
62 | | - | |
| 41 | + | |
63 | 42 | | |
64 | 43 | | |
65 | 44 | | |
| |||
0 commit comments