zJiaJun opened a new pull request, #13243:
URL: https://github.com/apache/skywalking/pull/13243

   This PR introduces a new end-to-end test case 
(`test/e2e-v2/cases/go/kafka-reporter/`) in the main SkyWalking repository. The 
primary goal is to enable verification of the Kafka reporter functionality for 
the SkyWalking Go agent, as introduced in `skywalking-go` PR 
https://github.com/apache/skywalking-go/pull/224
   
   **Key changes to enable this E2E test:**
   
   *   **New E2E Scenario:** Added the `kafka-reporter` test scenario, 
including its dedicated `docker-compose.yml` (setting up Kafka brokers, an OAP 
instance with Kafka fetcher, and the Go test service using the Kafka reporter) 
and `e2e.yaml` (defining test triggers and verification steps based on `swctl`).
   *   **Go Agent Service Dockerfile Enhancement:** The 
`test/e2e-v2/cases/go/service/Dockerfile` (which is used by this new Kafka E2E 
test via `context: ../service`) has been significantly enhanced to support 
building the Go agent from a specified Git repository and commit. This is 
crucial for testing unmerged `skywalking-go` PRs. The Dockerfile now:
       *   Accepts `SW_AGENT_GO_REPO_URL` (defaults to `apache/skywalking-go`) 
and `SW_AGENT_GO_COMMIT` as build arguments.
       *   Clones the specified `skywalking-go` repository and checks out the 
given commit.
       *   Runs `make build` within the cloned `skywalking-go` source to 
compile the agent binaries for various platforms.
       *   Dynamically determines the correct agent binary to use (e.g., 
`skywalking-go-agent-${COMMIT_SHORT}-${GOOS}-${GOARCH}`) based on the build 
environment's `GOOS`, `GOARCH` (obtained via `go env`), and the first 7 
characters of `SW_AGENT_GO_COMMIT`.
       *   Adds a `replace` directive in the test service's `go.mod` to ensure 
it uses the locally built agent from `/opt/skywalking-go`.
       *   Uses the compiled agent via `-toolexec` to build the test service.
   *   **CI Workflow Update:** The GitHub Actions workflow 
(`.github/workflows/skywalking.yaml`) has been updated to include this new 
`Agent Golang Kafka Reporter` E2E test in the matrix.
   *   **Standard Go E2E docker-compose.yml Update:** The 
`test/e2e-v2/cases/go/docker-compose.yml` for the standard Go E2E test has also 
been updated to allow overriding `SW_AGENT_GO_REPO_URL` as a build argument. 
This provides similar testing flexibility for the standard Go E2E test if 
needed in the future, although this PR's Kafka test uses its own specific 
`docker-compose.yml`
   
   - [ ] If this pull request closes/resolves/fixes an existing issue, replace 
the issue number. Closes #<issue number>. 
   - [x] Update the [`CHANGES` 
log](https://github.com/apache/skywalking/blob/master/docs/en/changes/changes.md).
 


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to