Skip to content

Collect BanyanDB data files on e2e test failure#13765

Open
wu-sheng wants to merge 11 commits intomasterfrom
fix/e2e-banyandb-data-collection
Open

Collect BanyanDB data files on e2e test failure#13765
wu-sheng wants to merge 11 commits intomasterfrom
fix/e2e-banyandb-data-collection

Conversation

@wu-sheng
Copy link
Copy Markdown
Member

@wu-sheng wu-sheng commented Mar 27, 2026

Collect BanyanDB data files on e2e test failure

  • Tests(including UT, IT, E2E) are added to verify the new feature.

Problem: When BanyanDB-related e2e tests fail, only container logs are uploaded. The actual
BanyanDB data files (trace, stream, measure, property, schema-property) are lost with container
cleanup, making it hard to diagnose storage-level issues.

Changes:

1. Collect BanyanDB data on failure

  • Update skywalking-infra-e2e to 36221fa (adds collect-on-failure)
  • Add cleanup.collect to all 18 BanyanDB e2e YAMLs:
    • 14 Docker Compose tests: collect by service: banyandb
    • 4 Kind (K8s) tests: collect by namespace: istio-system + label-selector: app.kubernetes.io/name=banyandb
  • Output to $SW_INFRA_E2E_LOG_DIR/banyandb-data — included in existing artifact upload

2. Remove custom root-path overrides from BanyanDB base compose

  • Removed --stream-root-path /tmp/stream-data --measure-root-path /tmp/measure-data from:
    • test/e2e-v2/script/docker-compose/base-compose.yml (affects all Compose BanyanDB tests)
    • test/e2e-v2/cases/storage/banyandb/docker-compose.yml
    • test/e2e-v2/cases/storage/banyandb/tls/docker-compose.yml
    • test/e2e-v2/cases/storage/banyandb/data-generate/docker-compose.yml
  • All modules now use BanyanDB default /tmp root path consistently
  • Updated stages data-generate GHA workflow and volume mounts to match

Collected directories (all under default /tmp root):

Directory Content
/tmp/trace/ Trace data (segments, indexes)
/tmp/stream/ Stream data (logs, sampled traces)
/tmp/measure/ Measure data (metrics from OAL)
/tmp/property/ Property data
/tmp/schema-property/ Schema property data

Verified results:

Docker Compose (test-logs-BanyanDB — 5.0MB):

banyandb-data/banyandb/tmp/ trace: 2.9M (872 files) ✅ stream: 372K (103 files) ✅ measure: 412K (93 files) ✅ property: 1.1M (9 files) ✅ schema-property: 14M (7 files) ✅ 

Kind / K8s (test-logs-eBPF Profiling On CPU BanyanDB — 4.6MB):

banyandb-data/istio-system/skywalking-banyandb-0/tmp/ trace: 0B (2 files) ✅ stream: 256K (75 files) ✅ measure: 20K (8 files) ✅ property: 1.1M (10 files) ✅ schema-property: 14M (6 files) ✅ 
  • If this pull request closes/resolves/fixes an existing issue, replace the issue number. Closes #.
  • Update the CHANGES log.
- Update infra-e2e to 36221fa (adds collect-on-failure feature) - Add cleanup.collect to all 18 BanyanDB e2e YAMLs - Compose tests: collect by service name - Kind tests: collect by label-selector app=banyandb - Data dirs: trace, stream, measure, property, schema-property - Output to $SW_INFRA_E2E_LOG_DIR/banyandb-data (included in existing upload) TESTING: intentional failure in storage/banyandb to verify data collection
@wu-sheng wu-sheng added the test Test requirements about performance, feature or before release. label Mar 27, 2026
@wu-sheng wu-sheng added this to the 10.4.0 milestone Mar 27, 2026
Artifact confirmed: banyandb-data/ directory uploaded with trace (796K), property (1.1M), schema-property (14M), 234 files.
@wu-sheng wu-sheng marked this pull request as ready for review March 27, 2026 12:04
@wu-sheng wu-sheng changed the title [DO NOT MERGE] Test: verify BanyanDB data collection on e2e failure Collect BanyanDB data files on e2e test failure Mar 27, 2026
- Compose: storage/banyandb — failure added as LAST verify case (after all 122+ real cases run, ensuring all 5 data dirs populated) - Kind: profiling/ebpf/oncpu/banyandb — failure after profiling cases Both tests will fail late, with full data in trace, stream, measure, property, and schema-property directories.
Kind BanyanDB pods are in istio-system namespace (not default). Label selector updated to app.kubernetes.io/name=banyandb to match the SkyWalking Helm chart convention.
Use a real query (service layer) with wrong expected file instead of echo. This ensures real verify cases pass first (populating all 5 BanyanDB data dirs), then the intentional mismatch triggers failure after data is fully flushed across all retries.
Compose (storage/banyandb): trace 3.1M/926 files, property 1.1M, schema-property 14M Kind (ebpf/oncpu/banyandb): stream 256K/75 files, measure 20K/8 files, property 1.1M, schema-property 14M Both paths confirmed: data collected before cleanup and included in existing log artifact upload.
@wu-sheng
Copy link
Copy Markdown
Member Author

wu-sheng commented Mar 27, 2026

Verification Results

Both Docker Compose and Kind (K8s) data collection verified with intentional test failures.

Docker Compose (test-logs-BanyanDB — 5.0MB)

All 5 directories collected after removing custom root-path overrides:

banyandb-data/banyandb/tmp/ trace: 2.9M (872 files) ✅ stream: 372K (103 files) ✅ measure: 412K (93 files) ✅ property: 1.1M (9 files) ✅ schema-property: 14M (7 files) ✅ 

Kind / K8s (test-logs-eBPF Profiling On CPU BanyanDB — 4.6MB)

banyandb-data/istio-system/skywalking-banyandb-0/tmp/ trace: 0B (2 files) ✅ stream: 256K (75 files) ✅ measure: 20K (8 files) ✅ property: 1.1M (10 files) ✅ schema-property: 14M (6 files) ✅ 

All 5 data directories collected successfully on both paths.
Data included in the existing $SW_INFRA_E2E_LOG_DIR upload — no extra artifact step needed.

Intentional failures removed. Ready to merge.

Base docker-compose overrides root paths: --stream-root-path /tmp/stream-data --measure-root-path /tmp/measure-data Collect from /tmp/stream-data/ and /tmp/measure-data/ instead of /tmp/stream/ and /tmp/measure/ which are empty.
Remove --stream-root-path and --measure-root-path from base-compose, storage, tls, and data-generate docker-compose files. All modules now use default /tmp root: /tmp/trace/, /tmp/stream/, /tmp/measure/, /tmp/property/, /tmp/schema-property/ Updated stages data-generate workflow and volume mounts to match. Collect paths in e2e YAMLs now align with actual data locations.
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR enhances BanyanDB-related E2E diagnostics by collecting BanyanDB on-disk data directories as artifacts on test failures, and aligns Compose/K8s setups to use BanyanDB’s default /tmp/* root layout (removing custom stream/measure root-path overrides).

Changes:

  • Bump apache/skywalking-infra-e2e action SHA and add cleanup.collect blocks to BanyanDB E2E configs to gather /tmp/{trace,stream,measure,property,schema-property} on failure.
  • Remove --stream-root-path / --measure-root-path overrides from BanyanDB Compose definitions.
  • Update the BanyanDB “stages” data-generate workflow + volume mounts to match the default /tmp/measure and /tmp/stream paths.

Reviewed changes

Copilot reviewed 24 out of 24 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
test/e2e-v2/script/docker-compose/base-compose.yml Removes BanyanDB root-path overrides to rely on default /tmp layout.
test/e2e-v2/cases/zipkin/banyandb/e2e.yaml Adds failure-only collection of BanyanDB data dirs.
test/e2e-v2/cases/storage/banyandb/e2e.yaml Adds failure-only collection of BanyanDB data dirs.
test/e2e-v2/cases/storage/banyandb/tls/e2e.yaml Adds failure-only collection of BanyanDB data dirs.
test/e2e-v2/cases/storage/banyandb/stages/e2e.yaml Adds failure-only collection of BanyanDB data dirs (compose stages topology).
test/e2e-v2/cases/profiling/trace/banyandb/e2e.yaml Adds failure-only collection of BanyanDB data dirs.
test/e2e-v2/cases/profiling/pprof/banyandb/e2e.yaml Adds failure-only collection of BanyanDB data dirs.
test/e2e-v2/cases/profiling/async-profiler/banyandb/e2e.yaml Adds failure-only collection of BanyanDB data dirs.
test/e2e-v2/cases/profiling/ebpf/oncpu/banyandb/e2e.yaml Adds failure-only collection from K8s (namespace + label selector).
test/e2e-v2/cases/profiling/ebpf/network/banyandb/e2e.yaml Adds failure-only collection from K8s (namespace + label selector).
test/e2e-v2/cases/profiling/ebpf/continuous/banyandb/e2e.yaml Adds failure-only collection from K8s (namespace + label selector).
test/e2e-v2/cases/profiling/ebpf/access_log/banyandb/e2e.yaml Adds failure-only collection from K8s (namespace + label selector).
test/e2e-v2/cases/menu/banyandb/e2e.yaml Adds failure-only collection of BanyanDB data dirs.
test/e2e-v2/cases/log/banyandb/e2e.yaml Adds failure-only collection of BanyanDB data dirs.
test/e2e-v2/cases/event/banyandb/e2e.yaml Adds failure-only collection of BanyanDB data dirs.
test/e2e-v2/cases/cluster/zk/banyandb/e2e.yaml Adds failure-only collection of BanyanDB data dirs.
test/e2e-v2/cases/baseline/banyandb/e2e.yaml Adds failure-only collection of BanyanDB data dirs.
test/e2e-v2/cases/banyandb/e2e.yaml Adds failure-only collection of BanyanDB data dirs.
test/e2e-v2/cases/alarm/banyandb/e2e.yaml Adds failure-only collection of BanyanDB data dirs.
test/e2e-v2/cases/storage/banyandb/docker-compose.yml Removes BanyanDB root-path overrides from auth-enabled compose test.
test/e2e-v2/cases/storage/banyandb/tls/docker-compose.yml Removes BanyanDB root-path overrides from TLS compose test.
test/e2e-v2/cases/storage/banyandb/data-generate/docker-compose.yml Removes BanyanDB root-path overrides from cold-data generator compose.
test/e2e-v2/cases/storage/banyandb/stages/docker-compose.yml Updates mounted paths to the default /tmp/measure and /tmp/stream layout.
.github/workflows/skywalking.yaml Updates infra-e2e action SHA and adjusts cold-data generation paths to default /tmp/measure/....

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

kezhenxu94
kezhenxu94 previously approved these changes Mar 27, 2026
The stages docker-compose has no 'banyandb' service. It uses data-hot1, data-warm1, data-cold1 as data nodes. Collect from all three to capture data across hot/warm/cold stages.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

test Test requirements about performance, feature or before release.

3 participants