[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6ACBRBNXZ57EN1G8GREKFY5":3,"skill-same:01M6ACBRBNXZ57EN1G8GREKFY5":65},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":8,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":18,"categories":19,"keywords":30,"publishedAt":36,"linkOnly":37,"markdownContent":38,"markdownBody":39,"frontMatter":40,"refName":43,"commitSha":44,"skillDirectory":45,"forksCount":46,"repositoryHtmlUrl":47,"repositoryHomepageUrl":48,"ownerHtmlUrl":49,"ownerBlogUrl":50,"ownerDescription":17,"updatedAt":51,"install":52,"resources":64},"01M6ACBRBNXZ57EN1G8GREKFY5","run-e2e","SkyWalking E2E 测试运行","Run SkyWalking E2E tests locally","在本地运行 SkyWalking E2E 测试。","apache\u002Fskywalking","apache","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F47359?v=4","01M6AC83E6K4FDKK7HZ8WNMQKE","The Apache Software Foundation","01M6ACB19NRCBY51M74TPEM71Y",25004,"Apache-2.0",null,"https:\u002F\u002Fgithub.com\u002Fapache\u002Fskywalking\u002Fblob\u002Fmaster\u002F.claude\u002Fskills\u002Frun-e2e\u002FSKILL.md",[20,25],{"categoryNo":21,"categoryName":22,"taxonomyType":23,"taxonomyTypeDesc":24},"01M8BQGD5WG86P4AQ5GPSSKBFR","测试工程师","PROFESSION","适用职业",{"categoryNo":26,"categoryName":27,"taxonomyType":28,"taxonomyTypeDesc":29},"01M8BQJH394GT47X57A9Q8G7HX","测试与质量保障","SCENARIO","使用场景",[31,32,33,34,35],"run","run e2e","test","e2e tests","skywalking","2026-11-10 10:12:30",false,"---\nname: run-e2e\ndescription: Run SkyWalking E2E tests locally\ndisable-model-invocation: true\nargument-hint: \"[test-case-path]\"\n---\n\n# Run SkyWalking E2E Test\n\nRun an E2E test case using `skywalking-infra-e2e`. The user provides a test case path (e.g., `simple\u002Fjdk`, `storage\u002Fbanyandb`, `alarm`).\n\n## Prerequisites\n\nAll tools require **Go** installed. Check `.github\u002Fworkflows\u002F` for the exact `e2e` commit used in CI.\n\n### e2e CLI\n\nBuilt from [apache\u002Fskywalking-infra-e2e](https:\u002F\u002Fgithub.com\u002Fapache\u002Fskywalking-infra-e2e), pinned by commit in CI:\n\n```bash\n# Install the pinned commit\ngo install github.com\u002Fapache\u002Fskywalking-infra-e2e\u002Fcmd\u002Fe2e@\u003Ccommit-id>\n\n# Or clone and build locally (useful when debugging the e2e tool itself)\ngit clone https:\u002F\u002Fgithub.com\u002Fapache\u002Fskywalking-infra-e2e.git\ncd skywalking-infra-e2e\ngit checkout \u003Ccommit-id>\nmake build\n# binary is in bin\u002Fe2e — add to PATH or copy to $GOPATH\u002Fbin\n```\n\n### swctl, yq, and other tools\n\nE2E test cases run pre-install steps (see `setup.steps` in each `e2e.yaml`) that install tools into `\u002Ftmp\u002Fskywalking-infra-e2e\u002Fbin`. When running locally, you need these tools on your PATH.\n\n**swctl** — SkyWalking CLI, used in verify cases to query OAP's GraphQL API. Pinned at `SW_CTL_COMMIT` in `test\u002Fe2e-v2\u002Fscript\u002Fenv`:\n\n```bash\n# Option 1: Use the install script (same as CI)\nbash test\u002Fe2e-v2\u002Fscript\u002Fprepare\u002Fsetup-e2e-shell\u002Finstall.sh swctl\nexport PATH=\u002Ftmp\u002Fskywalking-infra-e2e\u002Fbin:$PATH\n\n# Option 2: Build from source\ngo install github.com\u002Fapache\u002Fskywalking-cli\u002Fcmd\u002Fswctl@\u003CSW_CTL_COMMIT>\n```\n\n**yq** — YAML processor, used in verify cases:\n\n```bash\n# Option 1: Use the install script\nbash test\u002Fe2e-v2\u002Fscript\u002Fprepare\u002Fsetup-e2e-shell\u002Finstall.sh yq\nexport PATH=\u002Ftmp\u002Fskywalking-infra-e2e\u002Fbin:$PATH\n\n# Option 2: brew install yq (macOS)\n```\n\n**Other tools** (only needed for specific test cases):\n\n| Tool | Install script | Used by |\n|------|---------------|---------|\n| `kubectl` | `install.sh kubectl` | Kubernetes-based tests |\n| `helm` | `install.sh helm` | Helm chart tests |\n| `istioctl` | `install.sh istioctl` | Istio\u002Fservice mesh tests |\n| `etcdctl` | `install.sh etcdctl` | etcd cluster tests |\n\nAll install scripts are at `test\u002Fe2e-v2\u002Fscript\u002Fprepare\u002Fsetup-e2e-shell\u002F`.\n\n## Steps\n\n### 1. Determine the test case\n\nResolve the user's argument to a full path under `test\u002Fe2e-v2\u002Fcases\u002F`. If ambiguous, list matching directories and ask.\n\n```bash\nls test\u002Fe2e-v2\u002Fcases\u002F\u003Cargument>\u002Fe2e.yaml\n```\n\n### 2. Check if rebuild is needed\n\nCompare source file timestamps against the last build:\n\n```bash\n# OAP server changes since last build\nfind oap-server apm-protocol -type f \\( \\\n  -name \"*.java\" -o -name \"*.yaml\" -o -name \"*.yml\" -o \\\n  -name \"*.json\" -o -name \"*.xml\" -o -name \"*.properties\" -o \\\n  -name \"*.proto\" \\\n\\) -newer dist\u002Fapache-skywalking-apm-bin.tar.gz 2>\u002Fdev\u002Fnull | head -5\n\n# Test service changes since last build\nfind test\u002Fe2e-v2\u002Fjava-test-service -type f \\( \\\n  -name \"*.java\" -o -name \"*.xml\" -o -name \"*.yaml\" -o -name \"*.yml\" \\\n\\) -newer test\u002Fe2e-v2\u002Fjava-test-service\u002Fe2e-service-provider\u002Ftarget\u002F*.jar 2>\u002Fdev\u002Fnull | head -5\n```\n\nIf files are found, warn the user and suggest rebuilding before running.\n\n### 3. Rebuild if needed (only with user confirmation)\n\n```bash\n# Rebuild OAP\n.\u002Fmvnw clean flatten:flatten package -Pall -Dmaven.test.skip && make docker\n\n# Rebuild test services\n.\u002Fmvnw -f test\u002Fe2e-v2\u002Fjava-test-service\u002Fpom.xml clean flatten:flatten package\n```\n\n### 4. Run the E2E test\n\nSet required environment variables and run:\n\n```bash\nexport SW_AGENT_JDK_VERSION=8\ne2e run -c test\u002Fe2e-v2\u002Fcases\u002F\u003Ccase-path>\u002Fe2e.yaml\n```\n\n### 5. If the test fails\n\nDo NOT run cleanup immediately. Instead:\n\n1. Check container logs:\n   ```bash\n   docker compose -f test\u002Fe2e-v2\u002Fcases\u002F\u003Ccase-path>\u002Fdocker-compose.yml logs oap\n   docker compose -f test\u002Fe2e-v2\u002Fcases\u002F\u003Ccase-path>\u002Fdocker-compose.yml logs provider\n   ```\n\n2. Run verify separately (can retry after investigation):\n   ```bash\n   e2e verify -c test\u002Fe2e-v2\u002Fcases\u002F\u003Ccase-path>\u002Fe2e.yaml\n   ```\n\n3. Only cleanup when done debugging:\n   ```bash\n   e2e cleanup -c test\u002Fe2e-v2\u002Fcases\u002F\u003Ccase-path>\u002Fe2e.yaml\n   ```\n\n### 6. Manually fire each verify query (fast triage)\n\nThe `e2e verify` retry loop runs in sequence and stops at the first failing case, so a single bad query hides every case after it. When a verify fails, **run each verify case directly against the still-running OAP** before editing anything — you'll see the real error (bad flag, missing data, wrong expected), not the progress spinner. This is also the right way to author new verify cases: craft the query against live OAP, confirm the actual YAML, then write the expected file.\n\n```bash\n# Find the host-side port that infra-e2e bound to OAP's container port 12800.\n# (Each run picks a new random port; the trigger log prints it too.)\ndocker ps --filter \"name=skywalking_e2e-oap\" --format \"{{.Ports}}\" \\\n  | grep -oE \"[0-9]+->12800\" | head -1\n# => e.g. 56381->12800\n\nURL=http:\u002F\u002Flocalhost:56381\u002Fgraphql\nSWCTL=\u002Ftmp\u002Fskywalking-infra-e2e\u002Fbin\u002Fswctl\n\n# Copy the query from e2e.yaml verbatim, then substitute ${oap_host} → localhost\n# and ${oap_12800} → the port you just found:\n$SWCTL --display yaml --base-url=$URL service ly IOS\n$SWCTL --display yaml --base-url=$URL logs list --service-name=MyiOSApp\n$SWCTL --display yaml --base-url=$URL metrics exec --expression=service_cpm --service-name=MyiOSApp\n```\n\nWhen a `swctl` subcommand rejects a flag (`Incorrect Usage: flag provided but not defined: -layer`), the e2e config is using syntax the pinned `swctl` commit doesn't support. Find the right syntax with `swctl \u003Ccmd> --help` and update the e2e config. Common cases encountered:\n\n| Broken flag\u002Fform | Working form |\n|---|---|\n| `service ls --layer IOS` | `service ly IOS` |\n| `metrics exec ... --is-normal=true` | drop `--is-normal` (default behavior) |\n\nFor queries that *don't* use `swctl` (raw `curl` against `\u002Floki\u002F...`, Zipkin, PromQL), hit the matching exposed port:\n\n```bash\ncurl \"http:\u002F\u002Flocalhost:$(docker ps --filter name=skywalking_e2e-oap --format '{{.Ports}}' | grep -oE '[0-9]+->3100' | head -1 | cut -d'-' -f1)\u002Floki\u002Fapi\u002Fv1\u002Flabels\"\n```\n\n### 7. UI template changes require a fresh DB\n\n`UITemplateInitializer.initTemplate()` (in `oap-server\u002Fserver-core`) calls `uiTemplateManagementService.addIfNotExist(setting)` — keyed by the `id` field in each `ui-initialized-templates\u002F**\u002F*.json`. Same ID → skipped. So edits to an *existing* template JSON (adding widgets, relabeling, changing expressions) will **not** be applied on an already-initialized OAP, even after a container restart, because the old copy still lives in storage.\n\nTo pick up dashboard JSON changes:\n\n```bash\n# Remove both containers — BanyanDB stores state inside the container FS in the\n# e2e compose (no named volume), so removing the container wipes state cleanly.\ndocker rm -f skywalking_e2e-oap-1 skywalking_e2e-banyandb-1\n\n# For compose setups that use a named volume, also:\n# docker volume rm \u003Cvolume-name>\n\n# Then re-run — OAP sees empty storage, loads the new template JSON.\ne2e run -c test\u002Fe2e-v2\u002Fcases\u002F\u003Ccase>\u002Fe2e.yaml\n```\n\nSymptom to watch for: you edit the JSON, rebuild, redeploy — dashboard in the UI still shows the pre-edit layout. That's not a caching bug; that's `addIfNotExist` doing exactly what its name says.\n\n### 8. Author the expected YAML from live output\n\nFor a new verify case, the workflow is:\n\n1. Fire the query manually (see step 6) and capture the YAML.\n2. Pick which fields are *meaningful domain values* (must match exactly) vs *dynamic runtime values* (`notEmpty` \u002F `gt` \u002F `ge`). See `test\u002Fe2e-v2\u002FCLAUDE.md` for the decision guide.\n3. Write the expected file. If the response is a list, wrap the items in `{{- contains . }} ... {{- end }}` so ordering and extra actual items don't fail the match.\n4. Re-run `e2e verify` alone (the containers are still up from the previous run); iterate on the expected file without rebuilding.\n\n### 9. Expected-file authoring traps\n\nThese burn CI cycles and pass locally. Each was learned the hard way.\n\n**Unquoted `content: {{ notEmpty .content }}` with `:` inside the value.** Sim-generated or real log content routinely includes colons (`POST https:\u002F\u002Fapi.example.com\u002Fcart failed: 500`, `HTTP\u002F1.1 500: Internal Server Error`). Without quoting, the template renders to invalid YAML (snakeyaml parses `failed:` as a nested key) and the *whole log entry* marshals to `nil`. Symptom: diff shows `- nil` at *every* position in the expected logs list vs real maps in actual. Fix: wrap in single quotes — `content: '{{ notEmpty .content }}'`. Single-quoted YAML preserves `:` in the scalar; only fails on embedded `'`. Double quotes also work unless the content has `\"`.\n\n**Nested `contains` with multiple per-element pattern assertions against a varied stream.** The template renders the block body once per actual element; when the outer block body has *multiple* inner `contains` patterns asserting specific tag key\u002Fvalue pairs, and only *some* actuals satisfy all the inner patterns, `go-cmp` with `contains` can end up comparing `[rendered_for_A0, nil, nil, ...]` vs `[A0, A1, A2, ...]` and fail despite `contains` being permissive on extras. Specifically: outer `contains .logs` with a single log pattern + inner `contains .tags` asserting two distinct key\u002Fvalue pairs. On a simulator emitting heterogeneous errors (js + promise + ajax + pageNotFound), only a subset satisfy the inner assertion. Passes locally with 1–2 logs, fails in CI with 6+.\n- Keep the outer `contains` body lenient: field-shape checks (`notEmpty`, `gt`), one discriminator tag that *every* element in the stream carries.\n- Cover per-category assertions via separate labeled-metric verify cases, not inside the nested template.\n- Rule of thumb: \"at least one log exists with the right layer routing\" inside the logs expected; per-category coverage via `meter_*_count{label=X}` verify cases.\n\n**Hand-crafted OTLP curl payloads drift from real SDK output.** When the upstream SDK ships a published simulator image (mini-program-monitor's `sim-wechat` \u002F `sim-alipay`, browser-client-js sim, etc.), prefer driving the e2e with that image in `MODE=timed` with a bounded `DURATION_MS` over hand-rolling the OTLP JSON. Hand-crafted payloads miss real-world shape issues: delta-vs-cumulative temporality, label-cardinality surprises, stacktrace formatting variance, attribute key names that changed between SDK versions. Pin to a released tag (`v0.4.0`), not `:latest` or HEAD SHA — reproducibility.\n\n**`timeUnixNano: \"0\"` in an OTLP metric datapoint.** The receiver propagates this into MAL's bucket computation and the metric lands in the 1970 time bucket — `swctl metrics exec` over the \"last N minutes\" window won't find it. Either use `$(date +%s)000000000` at setup time or omit the field if the receiver accepts \"now\" as default.\n\n**Setup-step curl loop with `|| sleep` pattern.** The shell line `for ... do curl && break || sleep 5; done` exits 0 when every attempt connection-refused because the final `sleep 5` returns 0. OAP takes ~50 s to start in CI, so all attempts fail before OAP is ready, and the setup step silently succeeds with zero traffic ingested. Fix: `curl -sS -f --retry 30 --retry-delay 5 --retry-connrefused --retry-all-errors --max-time 10 ...` + `set -e` at step top.\n\n**`swctl` flag rejected.** If a verify case uses a flag the pinned `swctl` commit doesn't support (`service ls --layer` vs `service ly`), the whole case fails 20× before CI gives up. Fire each verify query by hand once before pushing (step 6 above).\n\n**Published image cache miss in CI.** `docker compose pull` sometimes hits rate limits or unreachable registries; the test spins until timeout with \"dependency failed to start\". Look at the CI log for `Error response from daemon: pull access denied` or `manifest unknown`. If you see that, pin a different image tag that's definitely published (check `docker manifest inspect \u003Ctag>` locally), not a floating one.\n\n## Common test cases\n\n| Shorthand | Path |\n|-----------|------|\n| `simple\u002Fjdk` | `test\u002Fe2e-v2\u002Fcases\u002Fsimple\u002Fjdk\u002F` |\n| `storage\u002Fbanyandb` | `test\u002Fe2e-v2\u002Fcases\u002Fstorage\u002Fbanyandb\u002F` |\n| `storage\u002Felasticsearch` | `test\u002Fe2e-v2\u002Fcases\u002Fstorage\u002Felasticsearch\u002F` |\n| `alarm` | `test\u002Fe2e-v2\u002Fcases\u002Falarm\u002F` |\n| `log` | `test\u002Fe2e-v2\u002Fcases\u002Flog\u002F` |\n| `profiling\u002Ftrace` | `test\u002Fe2e-v2\u002Fcases\u002Fprofiling\u002Ftrace\u002F` |\n","# Run SkyWalking E2E Test\n\nRun an E2E test case using `skywalking-infra-e2e`. The user provides a test case path (e.g., `simple\u002Fjdk`, `storage\u002Fbanyandb`, `alarm`).\n\n## Prerequisites\n\nAll tools require **Go** installed. Check `.github\u002Fworkflows\u002F` for the exact `e2e` commit used in CI.\n\n### e2e CLI\n\nBuilt from [apache\u002Fskywalking-infra-e2e](https:\u002F\u002Fgithub.com\u002Fapache\u002Fskywalking-infra-e2e), pinned by commit in CI:\n\n```bash\n# Install the pinned commit\ngo install github.com\u002Fapache\u002Fskywalking-infra-e2e\u002Fcmd\u002Fe2e@\u003Ccommit-id>\n\n# Or clone and build locally (useful when debugging the e2e tool itself)\ngit clone https:\u002F\u002Fgithub.com\u002Fapache\u002Fskywalking-infra-e2e.git\ncd skywalking-infra-e2e\ngit checkout \u003Ccommit-id>\nmake build\n# binary is in bin\u002Fe2e — add to PATH or copy to $GOPATH\u002Fbin\n```\n\n### swctl, yq, and other tools\n\nE2E test cases run pre-install steps (see `setup.steps` in each `e2e.yaml`) that install tools into `\u002Ftmp\u002Fskywalking-infra-e2e\u002Fbin`. When running locally, you need these tools on your PATH.\n\n**swctl** — SkyWalking CLI, used in verify cases to query OAP's GraphQL API. Pinned at `SW_CTL_COMMIT` in `test\u002Fe2e-v2\u002Fscript\u002Fenv`:\n\n```bash\n# Option 1: Use the install script (same as CI)\nbash test\u002Fe2e-v2\u002Fscript\u002Fprepare\u002Fsetup-e2e-shell\u002Finstall.sh swctl\nexport PATH=\u002Ftmp\u002Fskywalking-infra-e2e\u002Fbin:$PATH\n\n# Option 2: Build from source\ngo install github.com\u002Fapache\u002Fskywalking-cli\u002Fcmd\u002Fswctl@\u003CSW_CTL_COMMIT>\n```\n\n**yq** — YAML processor, used in verify cases:\n\n```bash\n# Option 1: Use the install script\nbash test\u002Fe2e-v2\u002Fscript\u002Fprepare\u002Fsetup-e2e-shell\u002Finstall.sh yq\nexport PATH=\u002Ftmp\u002Fskywalking-infra-e2e\u002Fbin:$PATH\n\n# Option 2: brew install yq (macOS)\n```\n\n**Other tools** (only needed for specific test cases):\n\n| Tool | Install script | Used by |\n|------|---------------|---------|\n| `kubectl` | `install.sh kubectl` | Kubernetes-based tests |\n| `helm` | `install.sh helm` | Helm chart tests |\n| `istioctl` | `install.sh istioctl` | Istio\u002Fservice mesh tests |\n| `etcdctl` | `install.sh etcdctl` | etcd cluster tests |\n\nAll install scripts are at `test\u002Fe2e-v2\u002Fscript\u002Fprepare\u002Fsetup-e2e-shell\u002F`.\n\n## Steps\n\n### 1. Determine the test case\n\nResolve the user's argument to a full path under `test\u002Fe2e-v2\u002Fcases\u002F`. If ambiguous, list matching directories and ask.\n\n```bash\nls test\u002Fe2e-v2\u002Fcases\u002F\u003Cargument>\u002Fe2e.yaml\n```\n\n### 2. Check if rebuild is needed\n\nCompare source file timestamps against the last build:\n\n```bash\n# OAP server changes since last build\nfind oap-server apm-protocol -type f \\( \\\n  -name \"*.java\" -o -name \"*.yaml\" -o -name \"*.yml\" -o \\\n  -name \"*.json\" -o -name \"*.xml\" -o -name \"*.properties\" -o \\\n  -name \"*.proto\" \\\n\\) -newer dist\u002Fapache-skywalking-apm-bin.tar.gz 2>\u002Fdev\u002Fnull | head -5\n\n# Test service changes since last build\nfind test\u002Fe2e-v2\u002Fjava-test-service -type f \\( \\\n  -name \"*.java\" -o -name \"*.xml\" -o -name \"*.yaml\" -o -name \"*.yml\" \\\n\\) -newer test\u002Fe2e-v2\u002Fjava-test-service\u002Fe2e-service-provider\u002Ftarget\u002F*.jar 2>\u002Fdev\u002Fnull | head -5\n```\n\nIf files are found, warn the user and suggest rebuilding before running.\n\n### 3. Rebuild if needed (only with user confirmation)\n\n```bash\n# Rebuild OAP\n.\u002Fmvnw clean flatten:flatten package -Pall -Dmaven.test.skip && make docker\n\n# Rebuild test services\n.\u002Fmvnw -f test\u002Fe2e-v2\u002Fjava-test-service\u002Fpom.xml clean flatten:flatten package\n```\n\n### 4. Run the E2E test\n\nSet required environment variables and run:\n\n```bash\nexport SW_AGENT_JDK_VERSION=8\ne2e run -c test\u002Fe2e-v2\u002Fcases\u002F\u003Ccase-path>\u002Fe2e.yaml\n```\n\n### 5. If the test fails\n\nDo NOT run cleanup immediately. Instead:\n\n1. Check container logs:\n   ```bash\n   docker compose -f test\u002Fe2e-v2\u002Fcases\u002F\u003Ccase-path>\u002Fdocker-compose.yml logs oap\n   docker compose -f test\u002Fe2e-v2\u002Fcases\u002F\u003Ccase-path>\u002Fdocker-compose.yml logs provider\n   ```\n\n2. Run verify separately (can retry after investigation):\n   ```bash\n   e2e verify -c test\u002Fe2e-v2\u002Fcases\u002F\u003Ccase-path>\u002Fe2e.yaml\n   ```\n\n3. Only cleanup when done debugging:\n   ```bash\n   e2e cleanup -c test\u002Fe2e-v2\u002Fcases\u002F\u003Ccase-path>\u002Fe2e.yaml\n   ```\n\n### 6. Manually fire each verify query (fast triage)\n\nThe `e2e verify` retry loop runs in sequence and stops at the first failing case, so a single bad query hides every case after it. When a verify fails, **run each verify case directly against the still-running OAP** before editing anything — you'll see the real error (bad flag, missing data, wrong expected), not the progress spinner. This is also the right way to author new verify cases: craft the query against live OAP, confirm the actual YAML, then write the expected file.\n\n```bash\n# Find the host-side port that infra-e2e bound to OAP's container port 12800.\n# (Each run picks a new random port; the trigger log prints it too.)\ndocker ps --filter \"name=skywalking_e2e-oap\" --format \"{{.Ports}}\" \\\n  | grep -oE \"[0-9]+->12800\" | head -1\n# => e.g. 56381->12800\n\nURL=http:\u002F\u002Flocalhost:56381\u002Fgraphql\nSWCTL=\u002Ftmp\u002Fskywalking-infra-e2e\u002Fbin\u002Fswctl\n\n# Copy the query from e2e.yaml verbatim, then substitute ${oap_host} → localhost\n# and ${oap_12800} → the port you just found:\n$SWCTL --display yaml --base-url=$URL service ly IOS\n$SWCTL --display yaml --base-url=$URL logs list --service-name=MyiOSApp\n$SWCTL --display yaml --base-url=$URL metrics exec --expression=service_cpm --service-name=MyiOSApp\n```\n\nWhen a `swctl` subcommand rejects a flag (`Incorrect Usage: flag provided but not defined: -layer`), the e2e config is using syntax the pinned `swctl` commit doesn't support. Find the right syntax with `swctl \u003Ccmd> --help` and update the e2e config. Common cases encountered:\n\n| Broken flag\u002Fform | Working form |\n|---|---|\n| `service ls --layer IOS` | `service ly IOS` |\n| `metrics exec ... --is-normal=true` | drop `--is-normal` (default behavior) |\n\nFor queries that *don't* use `swctl` (raw `curl` against `\u002Floki\u002F...`, Zipkin, PromQL), hit the matching exposed port:\n\n```bash\ncurl \"http:\u002F\u002Flocalhost:$(docker ps --filter name=skywalking_e2e-oap --format '{{.Ports}}' | grep -oE '[0-9]+->3100' | head -1 | cut -d'-' -f1)\u002Floki\u002Fapi\u002Fv1\u002Flabels\"\n```\n\n### 7. UI template changes require a fresh DB\n\n`UITemplateInitializer.initTemplate()` (in `oap-server\u002Fserver-core`) calls `uiTemplateManagementService.addIfNotExist(setting)` — keyed by the `id` field in each `ui-initialized-templates\u002F**\u002F*.json`. Same ID → skipped. So edits to an *existing* template JSON (adding widgets, relabeling, changing expressions) will **not** be applied on an already-initialized OAP, even after a container restart, because the old copy still lives in storage.\n\nTo pick up dashboard JSON changes:\n\n```bash\n# Remove both containers — BanyanDB stores state inside the container FS in the\n# e2e compose (no named volume), so removing the container wipes state cleanly.\ndocker rm -f skywalking_e2e-oap-1 skywalking_e2e-banyandb-1\n\n# For compose setups that use a named volume, also:\n# docker volume rm \u003Cvolume-name>\n\n# Then re-run — OAP sees empty storage, loads the new template JSON.\ne2e run -c test\u002Fe2e-v2\u002Fcases\u002F\u003Ccase>\u002Fe2e.yaml\n```\n\nSymptom to watch for: you edit the JSON, rebuild, redeploy — dashboard in the UI still shows the pre-edit layout. That's not a caching bug; that's `addIfNotExist` doing exactly what its name says.\n\n### 8. Author the expected YAML from live output\n\nFor a new verify case, the workflow is:\n\n1. Fire the query manually (see step 6) and capture the YAML.\n2. Pick which fields are *meaningful domain values* (must match exactly) vs *dynamic runtime values* (`notEmpty` \u002F `gt` \u002F `ge`). See `test\u002Fe2e-v2\u002FCLAUDE.md` for the decision guide.\n3. Write the expected file. If the response is a list, wrap the items in `{{- contains . }} ... {{- end }}` so ordering and extra actual items don't fail the match.\n4. Re-run `e2e verify` alone (the containers are still up from the previous run); iterate on the expected file without rebuilding.\n\n### 9. Expected-file authoring traps\n\nThese burn CI cycles and pass locally. Each was learned the hard way.\n\n**Unquoted `content: {{ notEmpty .content }}` with `:` inside the value.** Sim-generated or real log content routinely includes colons (`POST https:\u002F\u002Fapi.example.com\u002Fcart failed: 500`, `HTTP\u002F1.1 500: Internal Server Error`). Without quoting, the template renders to invalid YAML (snakeyaml parses `failed:` as a nested key) and the *whole log entry* marshals to `nil`. Symptom: diff shows `- nil` at *every* position in the expected logs list vs real maps in actual. Fix: wrap in single quotes — `content: '{{ notEmpty .content }}'`. Single-quoted YAML preserves `:` in the scalar; only fails on embedded `'`. Double quotes also work unless the content has `\"`.\n\n**Nested `contains` with multiple per-element pattern assertions against a varied stream.** The template renders the block body once per actual element; when the outer block body has *multiple* inner `contains` patterns asserting specific tag key\u002Fvalue pairs, and only *some* actuals satisfy all the inner patterns, `go-cmp` with `contains` can end up comparing `[rendered_for_A0, nil, nil, ...]` vs `[A0, A1, A2, ...]` and fail despite `contains` being permissive on extras. Specifically: outer `contains .logs` with a single log pattern + inner `contains .tags` asserting two distinct key\u002Fvalue pairs. On a simulator emitting heterogeneous errors (js + promise + ajax + pageNotFound), only a subset satisfy the inner assertion. Passes locally with 1–2 logs, fails in CI with 6+.\n- Keep the outer `contains` body lenient: field-shape checks (`notEmpty`, `gt`), one discriminator tag that *every* element in the stream carries.\n- Cover per-category assertions via separate labeled-metric verify cases, not inside the nested template.\n- Rule of thumb: \"at least one log exists with the right layer routing\" inside the logs expected; per-category coverage via `meter_*_count{label=X}` verify cases.\n\n**Hand-crafted OTLP curl payloads drift from real SDK output.** When the upstream SDK ships a published simulator image (mini-program-monitor's `sim-wechat` \u002F `sim-alipay`, browser-client-js sim, etc.), prefer driving the e2e with that image in `MODE=timed` with a bounded `DURATION_MS` over hand-rolling the OTLP JSON. Hand-crafted payloads miss real-world shape issues: delta-vs-cumulative temporality, label-cardinality surprises, stacktrace formatting variance, attribute key names that changed between SDK versions. Pin to a released tag (`v0.4.0`), not `:latest` or HEAD SHA — reproducibility.\n\n**`timeUnixNano: \"0\"` in an OTLP metric datapoint.** The receiver propagates this into MAL's bucket computation and the metric lands in the 1970 time bucket — `swctl metrics exec` over the \"last N minutes\" window won't find it. Either use `$(date +%s)000000000` at setup time or omit the field if the receiver accepts \"now\" as default.\n\n**Setup-step curl loop with `|| sleep` pattern.** The shell line `for ... do curl && break || sleep 5; done` exits 0 when every attempt connection-refused because the final `sleep 5` returns 0. OAP takes ~50 s to start in CI, so all attempts fail before OAP is ready, and the setup step silently succeeds with zero traffic ingested. Fix: `curl -sS -f --retry 30 --retry-delay 5 --retry-connrefused --retry-all-errors --max-time 10 ...` + `set -e` at step top.\n\n**`swctl` flag rejected.** If a verify case uses a flag the pinned `swctl` commit doesn't support (`service ls --layer` vs `service ly`), the whole case fails 20× before CI gives up. Fire each verify query by hand once before pushing (step 6 above).\n\n**Published image cache miss in CI.** `docker compose pull` sometimes hits rate limits or unreachable registries; the test spins until timeout with \"dependency failed to start\". Look at the CI log for `Error response from daemon: pull access denied` or `manifest unknown`. If you see that, pin a different image tag that's definitely published (check `docker manifest inspect \u003Ctag>` locally), not a floating one.\n\n## Common test cases\n\n| Shorthand | Path |\n|-----------|------|\n| `simple\u002Fjdk` | `test\u002Fe2e-v2\u002Fcases\u002Fsimple\u002Fjdk\u002F` |\n| `storage\u002Fbanyandb` | `test\u002Fe2e-v2\u002Fcases\u002Fstorage\u002Fbanyandb\u002F` |\n| `storage\u002Felasticsearch` | `test\u002Fe2e-v2\u002Fcases\u002Fstorage\u002Felasticsearch\u002F` |\n| `alarm` | `test\u002Fe2e-v2\u002Fcases\u002Falarm\u002F` |\n| `log` | `test\u002Fe2e-v2\u002Fcases\u002Flog\u002F` |\n| `profiling\u002Ftrace` | `test\u002Fe2e-v2\u002Fcases\u002Fprofiling\u002Ftrace\u002F` |\n",{"name":5,"description":7,"argument-hint":41,"disable-model-invocation":42},"[test-case-path]",true,"master","f4d38fdc21e5a929ef89556a1d7c337957523aa9",".claude\u002Fskills\u002Frun-e2e",6625,"https:\u002F\u002Fgithub.com\u002Fapache\u002Fskywalking","https:\u002F\u002Fskywalking.apache.org\u002F","https:\u002F\u002Fgithub.com\u002Fapache","https:\u002F\u002Fwww.apache.org\u002F","2026-11-15 01:32:44",{"source":9,"skillName":5,"commands":53,"prompt":63,"zipAvailable":42},[54,57,60],{"tool":55,"command":56},"npx","npx skills add apache\u002Fskywalking --skill run-e2e",{"tool":58,"command":59},"bunx","bunx skills add apache\u002Fskywalking --skill run-e2e",{"tool":61,"command":62},"pnpm","pnpm dlx skills add apache\u002Fskywalking --skill run-e2e","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fapache\u002Fskywalking\u002Fblob\u002Fmaster\u002F.claude\u002Fskills\u002Frun-e2e\u002FSKILL.md",[],[66,74,88,106,122,133],{"skillNo":67,"name":68,"nameZh":17,"description":69,"descriptionZh":17,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":70,"categories":71,"keywords":72,"publishedAt":73},"01M741VNBFSX1QZ75XWW9Z5BM0","tal","Write, compile, inspect and verify Trace Analysis Language (TAL) rules for the OTLP and SkyWalking native (sw-native) inputs — rule files, the compiler and runtime map, dumping and decompiling the generated classes, the v1-v2 checker, the branch gate and the benchmark. Use when changing TAL rules, the TAL grammar\u002Fcompiler, or the native trace analysis.","https:\u002F\u002Fgithub.com\u002Fapache\u002Fskywalking\u002Fblob\u002Fmaster\u002F.claude\u002Fskills\u002Ftal\u002FSKILL.md",[],[],"2026-11-11 15:11:14",{"skillNo":75,"name":33,"nameZh":76,"description":77,"descriptionZh":78,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":79,"categories":80,"keywords":83,"publishedAt":36},"01M6ACBTY89EEM81A0WWN0QQT3","单元与集成测试运行","Run unit tests, integration tests, or slow integration tests matching CI. Use to validate changes before submitting a PR.","运行单元测试、集成测试或与 CI 一致的慢速集成测试。用于在提交 PR 前验证变更。","https:\u002F\u002Fgithub.com\u002Fapache\u002Fskywalking\u002Fblob\u002Fmaster\u002F.claude\u002Fskills\u002Ftest\u002FSKILL.md",[81,82],{"categoryNo":21,"categoryName":22,"taxonomyType":23,"taxonomyTypeDesc":24},{"categoryNo":26,"categoryName":27,"taxonomyType":28,"taxonomyTypeDesc":29},[33,84,31,85,86,87],"validate","unit tests","pr","integration tests",{"skillNo":89,"name":90,"nameZh":91,"description":92,"descriptionZh":93,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":94,"categories":95,"keywords":102,"publishedAt":36},"01M6ACBNH0HSYFX2K9CYJSPAVM","package","SkyWalking 发行版与镜像重建","Rebuild the SkyWalking distribution and OAP Docker image after source changes. Use before running e2e tests so the image reflects your code changes. Avoids the \"image looks updated but runtime has stale jars\" trap.","在源码变更后重新构建 SkyWalking 发行版和 OAP Docker 镜像。在运行 e2e 测试前使用，以确保镜像反映你的代码改动，避免“镜像看似已更新但运行时仍是旧 jar”的陷阱。","https:\u002F\u002Fgithub.com\u002Fapache\u002Fskywalking\u002Fblob\u002Fmaster\u002F.claude\u002Fskills\u002Fpackage\u002FSKILL.md",[96,99],{"categoryNo":97,"categoryName":98,"taxonomyType":23,"taxonomyTypeDesc":24},"01M8BQ6TQZN6R52WBJ9H8NRMQM","软件开发工程师",{"categoryNo":100,"categoryName":101,"taxonomyType":28,"taxonomyTypeDesc":29},"01M8BSTR9G4A4GZ0VB2DFN9490","开发环境与工具链管理",[90,34,103,104,105,35],"code","image","docker",{"skillNo":107,"name":108,"nameZh":109,"description":110,"descriptionZh":111,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":112,"categories":113,"keywords":118,"publishedAt":36},"01M6ACBJQMZV0S42P4WMCFFPGP","new-monitoring-feature","SkyWalking 监控功能扩展开发","Add a new monitoring target \u002F layer to SkyWalking OAP. Orients you to the OAL \u002F MAL \u002F LAL \u002F TAL \u002F SpanListener extension points, the UI template + submodule touchpoints, the docs set that must move together, and the cross-cutting traps that don't live in any one skill.","为 SkyWalking OAP 添加新的监控目标 \u002F 层级。引导你了解 OAL \u002F MAL \u002F LAL \u002F TAL \u002F SpanListener 扩展点、UI 模板与子模块的接入点、必须同步变更的文档集合，以及不属于任何单一技能的跨领域陷阱。","https:\u002F\u002Fgithub.com\u002Fapache\u002Fskywalking\u002Fblob\u002Fmaster\u002F.claude\u002Fskills\u002Fnew-monitoring-feature\u002FSKILL.md",[114,115],{"categoryNo":97,"categoryName":98,"taxonomyType":23,"taxonomyTypeDesc":24},{"categoryNo":116,"categoryName":117,"taxonomyType":28,"taxonomyTypeDesc":29},"01M8BQGD3B3T8FK02S5JVCZA1M","运维监控与告警",[119,120,121,35],"new monitoring feature","extension points","docs",{"skillNo":123,"name":124,"nameZh":125,"description":126,"descriptionZh":127,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":128,"categories":129,"keywords":132,"publishedAt":36},"01M6ACBG5P0NY2A7AEX89BZNFH","license","Apache 许可证头与依赖合规检查","Check and fix Apache 2.0 license headers and dependency licenses using skywalking-eyes. Use before submitting a PR.","使用 skywalking-eyes 检查并修复 Apache 2.0 许可证头及依赖许可证。在提交 PR 前使用。","https:\u002F\u002Fgithub.com\u002Fapache\u002Fskywalking\u002Fblob\u002Fmaster\u002F.claude\u002Fskills\u002Flicense\u002FSKILL.md",[130,131],{"categoryNo":97,"categoryName":98,"taxonomyType":23,"taxonomyTypeDesc":24},{"categoryNo":100,"categoryName":101,"taxonomyType":28,"taxonomyTypeDesc":29},[124,86,10,35],{"skillNo":134,"name":135,"nameZh":136,"description":137,"descriptionZh":138,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":139,"categories":140,"keywords":145,"publishedAt":36},"01M6ACBDKKTXZ8Y36YHBADT8JA","gh-pull-request","GitHub PR 分支提交与推送","Verify, commit, and push changes on a PR branch. Runs pre-flight checks (compile, checkstyle, license headers) before every push. Also creates the PR if one doesn't exist yet.","在 PR 分支上验证、提交并推送变更。每次推送前都会运行预检（编译、checkstyle、许可证头检查）。如果 PR 尚不存在，也会一并创建。","https:\u002F\u002Fgithub.com\u002Fapache\u002Fskywalking\u002Fblob\u002Fmaster\u002F.claude\u002Fskills\u002Fgh-pull-request\u002FSKILL.md",[141,142],{"categoryNo":97,"categoryName":98,"taxonomyType":23,"taxonomyTypeDesc":24},{"categoryNo":143,"categoryName":144,"taxonomyType":28,"taxonomyTypeDesc":29},"01M8BR5V701HCN066VEP7H4812","代码仓库协作管理",[146,147,148,149,150,86,151],"gh pull request","pull request","pull","commit","compile","push"]