[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6AD262WFPRC5R0FPSCVAE7Y":3,"skill-same:01M6AD262WFPRC5R0FPSCVAE7Y":75},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":23,"publishedAt":46,"linkOnly":47,"markdownContent":48,"markdownBody":49,"frontMatter":50,"refName":53,"commitSha":54,"skillDirectory":55,"forksCount":56,"repositoryHtmlUrl":57,"repositoryHomepageUrl":58,"ownerHtmlUrl":59,"ownerBlogUrl":60,"ownerDescription":6,"updatedAt":61,"install":62,"resources":74},"01M6AD262WFPRC5R0FPSCVAE7Y","plugin-e2e",null,"Run SkyWalking Go plugin scenario tests and the end-to-end suite locally the way CI does, narrow a run to some framework versions, and diagnose build, dependency, runtime, and validation failures","apache\u002Fskywalking-go","apache","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F47359?v=4","01M6AC83E6K4FDKK7HZ8WNMQKE","The Apache Software Foundation","01M6AD23F9F0SVVQPKW9AT46QV",362,"Apache-2.0","https:\u002F\u002Fgithub.com\u002Fapache\u002Fskywalking-go\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fplugin-e2e\u002FSKILL.md",[18],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000008","测试与质量","SCENARIO","使用场景",[24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45],"plugin","plugin e2e","e2e","grep","suite","true","scenario","end","tests","runtime","build","dependency","edit","read","go","Bash","ci","skywalking","framework","validation","run","diagnose","2026-11-10 10:12:30",false,"---\nname: plugin-e2e\ndescription: Run SkyWalking Go plugin scenario tests and the end-to-end suite locally the way CI does, narrow a run to some framework versions, and diagnose build, dependency, runtime, and validation failures\nuser-invocable: true\nallowed-tools: Bash, Read, Glob, Grep, Edit\n---\n\n# Run Plugin Scenario Tests and E2E Locally\n\nAsk which scenario to run if the user did not say, or infer it from the changed\nplugins. A run of several cases takes minutes, so run it in the background and\nreport when it ends.\n\nScenario names usually match the plugin directory, with these exceptions:\n\n| Plugin | Scenario |\n|---|---|\n| `grpc`, `grpc-v184` | `grpc` |\n| `dubbo`, `dubbo-v331` | `dubbo` |\n| `runtimemetrics` | `runtime_metrics` |\n| `sql` | `mysql`, `postgres` |\n| `gorm` | `gorm` (MySQL driver), `gorm-postgres` (PostgreSQL driver) |\n| `toolkit-activation` | `trace-activation`, `logging-activation`, `metric-activation`, `cross-goroutine` |\n| logrus\u002Fzap logger (`tools\u002Fgo-agent\u002Finstrument\u002Flogger`) | `logrus`, `zap` |\n\n## Prerequisites\n\n```bash\ndocker info >\u002Fdev\u002Fnull && echo docker ok\ndocker-compose version --short    # the scenario scripts call docker-compose\nyq --version                      # mikefarah yq v4, used by run.sh\ngo version\n```\n\n## 1. Build the test tools\n\nRebuild after every change to the agent, a plugin, or the runner. This builds the\nlinux agent for the host architecture, the runner-helper, and the validator\nimage. Pass `VERSION`, because a stale gitignored `VERSION` file would make the\nbuild look for a binary name that does not exist.\n\n```bash\nmake -C test\u002Fplugins build VERSION=$(git rev-parse --short HEAD)\n```\n\n## 2. Run a scenario\n\nWrite the whole output to a file outside the workspace. Validator failures and\nsome build errors go to the command's output only, not to the case logs.\n\n```bash\nbash test\u002Fplugins\u002Frun.sh \u003Cscenario> > \u002Ftmp\u002F\u003Cscenario>.log 2>&1\nbash test\u002Fplugins\u002Frun.sh --debug \u003Cscenario> > \u002Ftmp\u002F\u003Cscenario>.log 2>&1   # keep workspace and actual data\n```\n\nEach `support-version` entry in `plugin.yml` produces one case per framework\nversion, `go\u003Cversion>-\u003Cframework version>`. Scenarios with `framework: go` have no\nframework list and run one `go\u003Cversion>-native` case per entry. The run stops at\nthe first failing case. Success ends with `Scenarios: \u003Cname>, Testcases: N`.\n\n`bash test\u002Fplugins\u002Frun.sh --clean` is a global cleanup:\n- it removes all dangling Docker images and prunes unused networks and volumes;\n- it deletes `test\u002Fplugins\u002Fdist` and `test\u002Fplugins\u002Fworkspace`.\n\nRun `--clean` on its own, then rebuild the test tools (step 1) before running a\nscenario. It currently exits non-zero when `test\u002Fplugins\u002Fworkspace` was already\nabsent. With a scenario name, a successful cleanup continues into that scenario,\nwhich then fails because `dist\u002Frunner-helper` was deleted.\n\nTo run only some versions, save the scenario's `plugin.yml`, edit it, run, then\nrestore the saved copy. The saved copy keeps any changes made before the run.\nNever commit a narrowed matrix.\n\n```bash\ncp test\u002Fplugins\u002Fscenarios\u002F\u003Cscenario>\u002Fplugin.yml \u002Ftmp\u002F\u003Cscenario>-plugin.yml\n# edit test\u002Fplugins\u002Fscenarios\u002F\u003Cscenario>\u002Fplugin.yml, then run the scenario\ncp \u002Ftmp\u002F\u003Cscenario>-plugin.yml test\u002Fplugins\u002Fscenarios\u002F\u003Cscenario>\u002Fplugin.yml\n```\n\n## 3. Diagnose failures\n\nA failed case keeps `test\u002Fplugins\u002Fworkspace\u002F\u003Cscenario>\u002F\u003Ccase>\u002Flogs\u002F`:\n- `service.log`: the service container's standard output. This includes\n  `bin\u002Fstartup.sh`, where the instrumented build and the application run.\n- `scenarios.log` and `runner-helper.log`: the standard output of the scenario\n  script, which includes the image build with `go mod tidy`, and of the\n  runner-helper.\n\nCompiler errors, panics, and validation reasons can appear only in the run output\nyou saved in step 2, so check that first.\n\n| Symptom | Usual cause |\n|---|---|\n| `failed to solve: ... go mod tidy` | The case's framework version does not resolve with the scenario's other requirements, or a dependency needs a newer Go. Reproduce it as described in section 4. |\n| `could not import X (open : no such file or directory)` | A copied plugin file imports a package that the hooked package does not import directly in that version. See the `build` skill and `AGENTS.md`. |\n| `undefined: skywalking_operator...` | An identifier in copied or injected code was rewritten. |\n| `panic` at startup | The application fails before serving, for example a protobuf `file \"x.proto\" is already registered` conflict. Give the scenario's proto file a unique name. |\n| `[ERROR] \u003Ccase>, validate actual data failed!` | The reported data differs from `config\u002Fexcepted.yml`. The `reason:` line names the first mismatch, such as a component id, or `ActualSegmentRefIsEmptyException` when context propagation is missing. |\n\nWhen a framework version legitimately reports different data, add an\nexpectation file and set `excepted-file: config\u002F\u003Cfile>.yml` on that version's\n`support-version` entry. Do not loosen the shared expectation file.\n\n## 4. Check what a case actually builds\n\n`run.sh` rewrites the `framework:` requirement in the case's `go.mod`. The\nDockerfile then adds the local agent `replace` (plus the toolkit one when\n`toolkit: true`) and a genproto requirement, and runs `go mod tidy` with\n`GOWORK=off` inside the image. The scenario's own requirements can still lift\nthe framework version. The host workspace copy does not contain these edits, so\ncheck the built image, which holds the last case that built successfully. Its name\nis `\u003Cproject>-service` with Compose v2 and `\u003Cproject>_service` with Compose v1\n(`docker-compose version --short`). `\u003Cproject>` is the scenario name in lower\ncase with the dots removed.\n\n```bash\ndocker run --rm --entrypoint go \u003Cproject>-service list -m \u003Cframework module>\n```\n\nTo reproduce on the host instead, use a temporary copy of the scenario:\n1. set its `go` line and framework version the way `run.sh` does;\n2. apply the Dockerfile's edits, with absolute paths instead of its\n   container-relative ones;\n3. run `go mod tidy` and `go list -m` with the case's Go version.\n\n```bash\nREPO=$(git rev-parse --show-toplevel)    # before entering the temporary copy\nexport GOWORK=off\ngo mod edit -replace=github.com\u002Fapache\u002Fskywalking-go=\"$REPO\" \\\n  -require=google.golang.org\u002Fgenproto@v0.0.0-20230530153820-e85fd2cbaebc\ngo mod edit -replace=github.com\u002Fapache\u002Fskywalking-go\u002Ftoolkit=\"$REPO\u002Ftoolkit\"   # only with toolkit: true\ngo mod tidy && go list -m \u003Cframework module>\n```\n\n`framework:` must be the module path exactly as written in `go.mod`, including a\n`\u002FvN` suffix. Otherwise every case builds the version pinned in `go.mod`.\n\n## 5. Adding or changing versions\n\n1. Add the version to `plugin.yml`: the oldest Go entry for the floor, plus a\n   newest-Go entry for the latest version.\n2. Bump the plugin module's framework requirement in `plugins\u002F\u003Cname>\u002Fgo.mod` when\n   the new version becomes the newest one.\n3. Run the scenario.\n4. Update `docs\u002Fen\u002Fagent\u002Fsupport-plugins.md` so the range is the tested min..max,\n   and add a `CHANGES.md` entry at the end of the matching section.\n5. List a new scenario in the `case` matrix of\n   `.github\u002Fworkflows\u002Fplugin-tests.yaml`.\n\nThe Docker scenarios run on ubuntu amd64 in CI. Local runs on arm64 do not\nexercise amd64-only code paths in frameworks, so CI is the final check. The\nseparate Windows workflow builds the `http` scenario on the host with\n`windows-scenarios.tpl`, without containers or `GOWORK=off`.\n\n## 6. End-to-end suite\n\n`test\u002Fe2e` runs the reporter cases (`grpc`, `grpc-multi-backend`, `kafka`) with\nskywalking-infra-e2e. Install the CLI at the same commit as\n`.github\u002Fworkflows\u002Fe2e.yaml`, into an explicit directory, and run that binary from\nthe repository root:\n\n```bash\nmake -C test\u002Fe2e build VERSION=$(git rev-parse --short HEAD)\nGOBIN=\u002Ftmp\u002Fskywalking-infra-e2e\u002Fbin go install \\\n  github.com\u002Fapache\u002Fskywalking-infra-e2e\u002Fcmd\u002Fe2e@7e4b5b68716fdb7b79b21fa8908f9db497e1b115\n\u002Ftmp\u002Fskywalking-infra-e2e\u002Fbin\u002Fe2e run -c test\u002Fe2e\u002Fcase\u002Fgrpc\u002Fe2e.yaml --batch-mode=true\n```\n\n## Report\n\nList each case with pass or fail. For a failure, give the case name, where the\nerror appeared (the run output or a log file), the first relevant error or\n`reason:` line, and the likely cause from the table.\n","# Run Plugin Scenario Tests and E2E Locally\n\nAsk which scenario to run if the user did not say, or infer it from the changed\nplugins. A run of several cases takes minutes, so run it in the background and\nreport when it ends.\n\nScenario names usually match the plugin directory, with these exceptions:\n\n| Plugin | Scenario |\n|---|---|\n| `grpc`, `grpc-v184` | `grpc` |\n| `dubbo`, `dubbo-v331` | `dubbo` |\n| `runtimemetrics` | `runtime_metrics` |\n| `sql` | `mysql`, `postgres` |\n| `gorm` | `gorm` (MySQL driver), `gorm-postgres` (PostgreSQL driver) |\n| `toolkit-activation` | `trace-activation`, `logging-activation`, `metric-activation`, `cross-goroutine` |\n| logrus\u002Fzap logger (`tools\u002Fgo-agent\u002Finstrument\u002Flogger`) | `logrus`, `zap` |\n\n## Prerequisites\n\n```bash\ndocker info >\u002Fdev\u002Fnull && echo docker ok\ndocker-compose version --short    # the scenario scripts call docker-compose\nyq --version                      # mikefarah yq v4, used by run.sh\ngo version\n```\n\n## 1. Build the test tools\n\nRebuild after every change to the agent, a plugin, or the runner. This builds the\nlinux agent for the host architecture, the runner-helper, and the validator\nimage. Pass `VERSION`, because a stale gitignored `VERSION` file would make the\nbuild look for a binary name that does not exist.\n\n```bash\nmake -C test\u002Fplugins build VERSION=$(git rev-parse --short HEAD)\n```\n\n## 2. Run a scenario\n\nWrite the whole output to a file outside the workspace. Validator failures and\nsome build errors go to the command's output only, not to the case logs.\n\n```bash\nbash test\u002Fplugins\u002Frun.sh \u003Cscenario> > \u002Ftmp\u002F\u003Cscenario>.log 2>&1\nbash test\u002Fplugins\u002Frun.sh --debug \u003Cscenario> > \u002Ftmp\u002F\u003Cscenario>.log 2>&1   # keep workspace and actual data\n```\n\nEach `support-version` entry in `plugin.yml` produces one case per framework\nversion, `go\u003Cversion>-\u003Cframework version>`. Scenarios with `framework: go` have no\nframework list and run one `go\u003Cversion>-native` case per entry. The run stops at\nthe first failing case. Success ends with `Scenarios: \u003Cname>, Testcases: N`.\n\n`bash test\u002Fplugins\u002Frun.sh --clean` is a global cleanup:\n- it removes all dangling Docker images and prunes unused networks and volumes;\n- it deletes `test\u002Fplugins\u002Fdist` and `test\u002Fplugins\u002Fworkspace`.\n\nRun `--clean` on its own, then rebuild the test tools (step 1) before running a\nscenario. It currently exits non-zero when `test\u002Fplugins\u002Fworkspace` was already\nabsent. With a scenario name, a successful cleanup continues into that scenario,\nwhich then fails because `dist\u002Frunner-helper` was deleted.\n\nTo run only some versions, save the scenario's `plugin.yml`, edit it, run, then\nrestore the saved copy. The saved copy keeps any changes made before the run.\nNever commit a narrowed matrix.\n\n```bash\ncp test\u002Fplugins\u002Fscenarios\u002F\u003Cscenario>\u002Fplugin.yml \u002Ftmp\u002F\u003Cscenario>-plugin.yml\n# edit test\u002Fplugins\u002Fscenarios\u002F\u003Cscenario>\u002Fplugin.yml, then run the scenario\ncp \u002Ftmp\u002F\u003Cscenario>-plugin.yml test\u002Fplugins\u002Fscenarios\u002F\u003Cscenario>\u002Fplugin.yml\n```\n\n## 3. Diagnose failures\n\nA failed case keeps `test\u002Fplugins\u002Fworkspace\u002F\u003Cscenario>\u002F\u003Ccase>\u002Flogs\u002F`:\n- `service.log`: the service container's standard output. This includes\n  `bin\u002Fstartup.sh`, where the instrumented build and the application run.\n- `scenarios.log` and `runner-helper.log`: the standard output of the scenario\n  script, which includes the image build with `go mod tidy`, and of the\n  runner-helper.\n\nCompiler errors, panics, and validation reasons can appear only in the run output\nyou saved in step 2, so check that first.\n\n| Symptom | Usual cause |\n|---|---|\n| `failed to solve: ... go mod tidy` | The case's framework version does not resolve with the scenario's other requirements, or a dependency needs a newer Go. Reproduce it as described in section 4. |\n| `could not import X (open : no such file or directory)` | A copied plugin file imports a package that the hooked package does not import directly in that version. See the `build` skill and `AGENTS.md`. |\n| `undefined: skywalking_operator...` | An identifier in copied or injected code was rewritten. |\n| `panic` at startup | The application fails before serving, for example a protobuf `file \"x.proto\" is already registered` conflict. Give the scenario's proto file a unique name. |\n| `[ERROR] \u003Ccase>, validate actual data failed!` | The reported data differs from `config\u002Fexcepted.yml`. The `reason:` line names the first mismatch, such as a component id, or `ActualSegmentRefIsEmptyException` when context propagation is missing. |\n\nWhen a framework version legitimately reports different data, add an\nexpectation file and set `excepted-file: config\u002F\u003Cfile>.yml` on that version's\n`support-version` entry. Do not loosen the shared expectation file.\n\n## 4. Check what a case actually builds\n\n`run.sh` rewrites the `framework:` requirement in the case's `go.mod`. The\nDockerfile then adds the local agent `replace` (plus the toolkit one when\n`toolkit: true`) and a genproto requirement, and runs `go mod tidy` with\n`GOWORK=off` inside the image. The scenario's own requirements can still lift\nthe framework version. The host workspace copy does not contain these edits, so\ncheck the built image, which holds the last case that built successfully. Its name\nis `\u003Cproject>-service` with Compose v2 and `\u003Cproject>_service` with Compose v1\n(`docker-compose version --short`). `\u003Cproject>` is the scenario name in lower\ncase with the dots removed.\n\n```bash\ndocker run --rm --entrypoint go \u003Cproject>-service list -m \u003Cframework module>\n```\n\nTo reproduce on the host instead, use a temporary copy of the scenario:\n1. set its `go` line and framework version the way `run.sh` does;\n2. apply the Dockerfile's edits, with absolute paths instead of its\n   container-relative ones;\n3. run `go mod tidy` and `go list -m` with the case's Go version.\n\n```bash\nREPO=$(git rev-parse --show-toplevel)    # before entering the temporary copy\nexport GOWORK=off\ngo mod edit -replace=github.com\u002Fapache\u002Fskywalking-go=\"$REPO\" \\\n  -require=google.golang.org\u002Fgenproto@v0.0.0-20230530153820-e85fd2cbaebc\ngo mod edit -replace=github.com\u002Fapache\u002Fskywalking-go\u002Ftoolkit=\"$REPO\u002Ftoolkit\"   # only with toolkit: true\ngo mod tidy && go list -m \u003Cframework module>\n```\n\n`framework:` must be the module path exactly as written in `go.mod`, including a\n`\u002FvN` suffix. Otherwise every case builds the version pinned in `go.mod`.\n\n## 5. Adding or changing versions\n\n1. Add the version to `plugin.yml`: the oldest Go entry for the floor, plus a\n   newest-Go entry for the latest version.\n2. Bump the plugin module's framework requirement in `plugins\u002F\u003Cname>\u002Fgo.mod` when\n   the new version becomes the newest one.\n3. Run the scenario.\n4. Update `docs\u002Fen\u002Fagent\u002Fsupport-plugins.md` so the range is the tested min..max,\n   and add a `CHANGES.md` entry at the end of the matching section.\n5. List a new scenario in the `case` matrix of\n   `.github\u002Fworkflows\u002Fplugin-tests.yaml`.\n\nThe Docker scenarios run on ubuntu amd64 in CI. Local runs on arm64 do not\nexercise amd64-only code paths in frameworks, so CI is the final check. The\nseparate Windows workflow builds the `http` scenario on the host with\n`windows-scenarios.tpl`, without containers or `GOWORK=off`.\n\n## 6. End-to-end suite\n\n`test\u002Fe2e` runs the reporter cases (`grpc`, `grpc-multi-backend`, `kafka`) with\nskywalking-infra-e2e. Install the CLI at the same commit as\n`.github\u002Fworkflows\u002Fe2e.yaml`, into an explicit directory, and run that binary from\nthe repository root:\n\n```bash\nmake -C test\u002Fe2e build VERSION=$(git rev-parse --short HEAD)\nGOBIN=\u002Ftmp\u002Fskywalking-infra-e2e\u002Fbin go install \\\n  github.com\u002Fapache\u002Fskywalking-infra-e2e\u002Fcmd\u002Fe2e@7e4b5b68716fdb7b79b21fa8908f9db497e1b115\n\u002Ftmp\u002Fskywalking-infra-e2e\u002Fbin\u002Fe2e run -c test\u002Fe2e\u002Fcase\u002Fgrpc\u002Fe2e.yaml --batch-mode=true\n```\n\n## Report\n\nList each case with pass or fail. For a failure, give the case name, where the\nerror appeared (the run output or a log file), the first relevant error or\n`reason:` line, and the likely cause from the table.\n",{"name":5,"description":7,"allowed-tools":51,"user-invocable":52},"Bash, Read, Glob, Grep, Edit",true,"main","b4cb55d487ca05b925f3314ded017bc018af58f0",".claude\u002Fskills\u002Fplugin-e2e",122,"https:\u002F\u002Fgithub.com\u002Fapache\u002Fskywalking-go","https:\u002F\u002Fskywalking.apache.org\u002F","https:\u002F\u002Fgithub.com\u002Fapache","https:\u002F\u002Fwww.apache.org\u002F","2026-11-12 08:55:35",{"source":8,"skillName":5,"commands":63,"prompt":73,"zipAvailable":52},[64,67,70],{"tool":65,"command":66},"npx","npx skills add apache\u002Fskywalking-go --skill plugin-e2e",{"tool":68,"command":69},"bunx","bunx skills add apache\u002Fskywalking-go --skill plugin-e2e",{"tool":71,"command":72},"pnpm","pnpm dlx skills add apache\u002Fskywalking-go --skill plugin-e2e","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fapache\u002Fskywalking-go\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fplugin-e2e\u002FSKILL.md",[],[]]