You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@skywalking.apache.org by "wu-sheng (via GitHub)" <gi...@apache.org> on 2026/04/14 02:10:20 UTC

[PR] feat: migrate to testcontainers-go v0.42.0 and upgrade dependencies [skywalking-infra-e2e]

wu-sheng opened a new pull request, #146:
URL: https://github.com/apache/skywalking-infra-e2e/pull/146

   ## Summary
   
   Major dependency upgrade and code simplification:
   
   - **Migrate testcontainers-go** from v0.11.1 to v0.42.0, using native compose/container APIs
   - **Delete 686 lines** of custom `DockerContainer`/`DockerProvider` re-implementation (`compose_provider.go`, `compose_listener.go`)
   - **Upgrade all major dependencies**: docker v28.5.2, k8s v0.35.3, kind v0.31.0, cobra v1.10.2
   - **Remove docker-compose v1** binary install from CI — v0.42.0 uses Docker Compose v2 plugin natively
   
   ## What Changed
   
   | File | Change |
   |------|--------|
   | `compose_provider.go` | **Deleted** (601 lines) — native testcontainers DockerContainer replaces custom impl |
   | `compose_listener.go` | **Deleted** (85 lines) — `stack.ServiceContainer()` replaces Docker event listening |
   | `compose.go` | Rewritten: `LocalDockerCompose` → `compose.NewDockerComposeWith` + `stack.Up/ServiceContainer` |
   | `cleanup/compose.go` | Rewritten: uses `stack.Down` with `RemoveVolumes`/`RemoveOrphans` |
   | `kind.go` | Updated docker image API types (`types.ImageListOptions` → `image.ListOptions`) |
   | `k8s.go` | Updated `NewShortcutExpander` to use warning callback (new k8s API) |
   | `action.yaml` | Updated Go to 1.26, removed docker-compose v1 install |
   | `e2e-test.yaml` | Removed docker-compose v1 install step |
   
   ## User-Facing Contract Preserved
   
   - Config format (`e2e.yaml`) unchanged
   - Environment variable export: `<SERVICE>_host`, `<SERVICE>_<PORT>`
   - Log files at `logDir/serviceName/std.log`
   - CLI flags and subcommands unchanged
   - Cleanup behavior unchanged
   - `GITHUB_RUN_ID` project identifier unchanged
   
   ## Test plan
   
   - [x] `go build ./...` passes
   - [x] `make lint` passes (0 issues)
   - [x] `go test ./...` passes (all unit tests)
   - [x] `make build` cross-compilation passes (windows/linux/darwin)
   - [ ] CI Build workflow passes
   - [ ] CI E2E Test (compose) passes — **critical, validates full compose lifecycle**
   - [ ] CI E2E Test (kind) passes
   
   Supersedes #139
   
   🤖 Generated with [Claude Code](https://claude.com/claude-code)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@skywalking.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feat: migrate to testcontainers-go v0.42.0 and upgrade dependencies [skywalking-infra-e2e]

Posted by "kezhenxu94 (via GitHub)" <gi...@apache.org>.
kezhenxu94 commented on code in PR #146:
URL: https://github.com/apache/skywalking-infra-e2e/pull/146#discussion_r3083568694


##########
action.yaml:
##########
@@ -31,35 +31,14 @@ inputs:
 runs:
   using: "composite"
   steps:
-    - name: Disable containerd image store
+    - name: Set Docker API version
       shell: bash
       run: |
-        DAEMON_JSON="/etc/docker/daemon.json"
-        if [ -f "$DAEMON_JSON" ]; then
-          sudo jq '. + {"features": {"containerd-snapshotter": false}}' "$DAEMON_JSON" \
-            | sudo tee "${DAEMON_JSON}.tmp" > /dev/null
-          sudo mv "${DAEMON_JSON}.tmp" "$DAEMON_JSON"
-        else
-          echo '{"features": {"containerd-snapshotter": false}}' \
-            | sudo tee "$DAEMON_JSON" > /dev/null
-        fi
-        sudo systemctl restart docker
-        docker version
-        docker info
         echo "DOCKER_API_VERSION=$(docker version --format '{{.Server.APIVersion}}')" >> "$GITHUB_ENV"

Review Comment:
   Do we still need this now? This entire step was added to work around the issue, I think the entire step `Set Docker API version` can be removed 



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@skywalking.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feat: migrate to testcontainers-go v0.42.0 and upgrade dependencies [skywalking-infra-e2e]

Posted by "kezhenxu94 (via GitHub)" <gi...@apache.org>.
kezhenxu94 merged PR #146:
URL: https://github.com/apache/skywalking-infra-e2e/pull/146


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@skywalking.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feat: migrate to testcontainers-go v0.42.0 and upgrade dependencies [skywalking-infra-e2e]

Posted by "wu-sheng (via GitHub)" <gi...@apache.org>.
wu-sheng commented on code in PR #146:
URL: https://github.com/apache/skywalking-infra-e2e/pull/146#discussion_r3083571226


##########
action.yaml:
##########
@@ -31,35 +31,14 @@ inputs:
 runs:
   using: "composite"
   steps:
-    - name: Disable containerd image store
+    - name: Set Docker API version
       shell: bash
       run: |
-        DAEMON_JSON="/etc/docker/daemon.json"
-        if [ -f "$DAEMON_JSON" ]; then
-          sudo jq '. + {"features": {"containerd-snapshotter": false}}' "$DAEMON_JSON" \
-            | sudo tee "${DAEMON_JSON}.tmp" > /dev/null
-          sudo mv "${DAEMON_JSON}.tmp" "$DAEMON_JSON"
-        else
-          echo '{"features": {"containerd-snapshotter": false}}' \
-            | sudo tee "$DAEMON_JSON" > /dev/null
-        fi
-        sudo systemctl restart docker
-        docker version
-        docker info
         echo "DOCKER_API_VERSION=$(docker version --format '{{.Server.APIVersion}}')" >> "$GITHUB_ENV"

Review Comment:
   Yes, we still need this line to keep client version following the server declared.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@skywalking.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feat: migrate to testcontainers-go v0.42.0 and upgrade dependencies [skywalking-infra-e2e]

Posted by "kezhenxu94 (via GitHub)" <gi...@apache.org>.
kezhenxu94 commented on code in PR #146:
URL: https://github.com/apache/skywalking-infra-e2e/pull/146#discussion_r3083630264


##########
.github/workflows/build.yaml:
##########
@@ -36,23 +34,48 @@ jobs:
           cache-dependency-path: |
             go.sum
         id: go
-
       - name: Check out code into the Go module directory
         uses: actions/checkout@v4
-
       - name: Check License
         uses: apache/skywalking-eyes@ec88b7d850018c8983f87729ea88549e100c5c82
         env:
           GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
-
       - name: Lint Codes
         run: make lint
-
       - name: Test
-        run: make test
-
+        run: CGO_ENABLED=1 make test
+  build-platform:
+    name: Build (${{ matrix.os }})
+    strategy:
+      matrix:
+        os:
+          - ubuntu-latest
+          - windows-latest
+          - macos-latest

Review Comment:
   Restoring the build target to build all platforms now this matrix builds them all three times, 



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@skywalking.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feat: migrate to testcontainers-go v0.42.0 and upgrade dependencies [skywalking-infra-e2e]

Posted by "kezhenxu94 (via GitHub)" <gi...@apache.org>.
kezhenxu94 commented on code in PR #146:
URL: https://github.com/apache/skywalking-infra-e2e/pull/146#discussion_r3083573230


##########
Makefile:
##########
@@ -57,10 +61,10 @@ windows: PROJECT_SUFFIX=.exe
 .PHONY: $(PLATFORMS)
 $(PLATFORMS):
 	mkdir -p $(OUT_DIR)
-	GOOS=$(os) GOARCH=$(GOARCH) $(GO_BUILD) $(GO_BUILD_FLAGS) -ldflags "$(GO_BUILD_LDFLAGS)" -o $(OUT_DIR)/$(os)/$(PROJECT)$(PROJECT_SUFFIX) cmd/e2e/main.go
+	GOOS=$(os) GOARCH=$(GOARCH) CGO_ENABLED=$(CGO_FLAG) $(GO_BUILD) $(GO_BUILD_FLAGS) -ldflags "$(GO_BUILD_LDFLAGS)" -o $(OUT_DIR)/$(os)/$(PROJECT)$(PROJECT_SUFFIX) cmd/e2e/main.go
 
 .PHONY: build
-build: windows linux darwin
+build: $(GOOS)

Review Comment:
   Changing the `build` target to only build the current OS will break the `release` target? The `release` target depends on this to build all binaries for all OS'es



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@skywalking.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feat: migrate to testcontainers-go v0.42.0 and upgrade dependencies [skywalking-infra-e2e]

Posted by "wu-sheng (via GitHub)" <gi...@apache.org>.
wu-sheng commented on PR #146:
URL: https://github.com/apache/skywalking-infra-e2e/pull/146#issuecomment-4241114633

   Fixed: removed `compose.Wait(true)` which mapped to `docker compose up --wait`, requiring all containers to reach running+healthy state. This was too strict — containers without healthchecks or init containers that exit would cause failures.
   
   Port readiness is already handled by `stack.WaitForService()` with per-port wait strategies, which is sufficient.
   
   Found via apache/skywalking#13817 testing.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@skywalking.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org