Skip to content

Collect BanyanDB data files on e2e test failure#13765

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

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

Conversation

@wu-sheng
Copy link
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:
    /tmp/trace/, /tmp/stream/, /tmp/measure/, /tmp/property/, /tmp/schema-property/
  • Updated stages data-generate GHA workflow and volume mounts to match

Collected directories:

  • /tmp/trace/ — trace data
  • /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 with intentional failures on both Docker Compose and Kind paths. See PR comments for
detailed artifact structure and data sizes.

  • 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
Member Author

Verification Results

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

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

banyandb-data/banyandb/tmp/
  trace:           3.1M   (926 files) ✅
  property:        1.1M   (10 files)  ✅
  schema-property:  14M   (5 files)   ✅
  stream:            -    (0 files)   — test scenario doesn't generate log data
  measure:           -    (0 files)   — metrics not flushed to segments in this test

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. Kind path correctly uses namespace: istio-system and label-selector: app.kubernetes.io/name=banyandb, with pod name (skywalking-banyandb-0) in the output path.

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.
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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant