Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
67 commits
Select commit Hold shift + click to select a range
1710e48
Add Groovy replacement plan for MAL, LAL, and Hierarchy scripts
wu-sheng Feb 28, 2026
2f928fc
Add pure Java interfaces and functional overloads for MAL/LAL (Phase 1)
wu-sheng Feb 28, 2026
0170c10
Add MAL transpiler module for build-time Groovy-to-Java conversion (P…
wu-sheng Feb 28, 2026
a22f67a
Add LAL transpiler module for build-time Groovy-to-Java conversion (P…
wu-sheng Feb 28, 2026
e9a6c9d
Add v2 runtime modules for MAL and LAL with manifest-based class load…
wu-sheng Feb 28, 2026
0b8ec1c
Refactor hierarchy rules: replace Groovy Closure with Java BiFunction…
wu-sheng Feb 28, 2026
d600e8d
Add dual-path comparison test suites for v1/v2 Groovy replacement (Ph…
wu-sheng Feb 28, 2026
b5b4ee9
Merge grammar and compiler modules into analyzer modules; wire MAL DS…
wu-sheng Feb 28, 2026
85b9fb0
Fix MAL/LAL/Hierarchy compiler gaps for full v1-v2 parity
wu-sheng Mar 1, 2026
f412703
Replace groovy-replacement-plan.md with dsl-compiler-design.md coveri…
wu-sheng Mar 1, 2026
badac64
Add run-e2e skill for local E2E test execution
wu-sheng Mar 1, 2026
e573818
Fix LAL compiler gaps: tag(), safe nav, nested blocks, else-if chains…
wu-sheng Mar 1, 2026
4963d2b
Restructure test/script-compiler into test/script-cases with shared s…
wu-sheng Mar 1, 2026
f82db7f
Remove microbench module; relocate JMH benchmarks to target modules
wu-sheng Mar 1, 2026
2e7ae63
Fix all MAL/LAL v2 compiler gaps and add runtime execution comparison
wu-sheng Mar 1, 2026
efbcb16
Update DSL compiler docs with MAL runtime execution comparison and LA…
wu-sheng Mar 1, 2026
5972cdb
Move all v2 DSL classes to .v2. packages for MAL/LAL/Hierarchy
wu-sheng Mar 1, 2026
cae90d5
Support regex match, def type inference, GString interpolation, and t…
wu-sheng Mar 2, 2026
c884b00
Improve MAL bytecode: single-variable run(), LocalVariableTable, and …
wu-sheng Mar 2, 2026
9cd7a04
Add LocalVariableTable to LAL and Hierarchy generated bytecode
wu-sheng Mar 2, 2026
f0cdbd3
Extract LAL helper methods to LalRuntimeHelper static utility class
wu-sheng Mar 2, 2026
faf7d56
Update LAL CLAUDE.md to document LalRuntimeHelper and clean up Javadoc
wu-sheng Mar 2, 2026
5d8bf29
Fix LAL sampler rateLimit in if-blocks and replace generic helpers wi…
wu-sheng Mar 2, 2026
58eafed
Flatten LAL to single class, remove BINDING ThreadLocal, pass ctx exp…
wu-sheng Mar 3, 2026
1f5a421
Add LocalVariableTable to all MAL generated methods (metadata, closur…
wu-sheng Mar 3, 2026
1ea91b0
Remove Maven ${revision} property and flatten-maven-plugin; hardcode …
wu-sheng Mar 3, 2026
119441c
Improve LAL generated code readability for extraLogType proto getter …
wu-sheng Mar 3, 2026
5595a31
Merge remote-tracking branch 'origin/master' into groovy-replace
wu-sheng Mar 3, 2026
8f02a2f
Make LAL DSL wrapper immutable by removing mutable ctx field
wu-sheng Mar 3, 2026
7dad902
Fix license headers and javadoc issues for CI compliance
wu-sheng Mar 3, 2026
eed2261
Fix javadoc heading levels in GRPCServer and HTTPServer
wu-sheng Mar 3, 2026
4bca9b2
Fix javadoc errors for JDK 25 compatibility
wu-sheng Mar 4, 2026
cccdb00
Remove flatten:flatten from CI and fix hierarchy javadoc errors
wu-sheng Mar 4, 2026
f98d502
Add Claude Code skills for compile, license, and test; clean up CLAUD…
wu-sheng Mar 4, 2026
a4cbd53
Move Build System section from CLAUDE.md into compile skill
wu-sheng Mar 4, 2026
8651048
Fix MAL closure operator precedence, cast parenthesization, and array…
wu-sheng Mar 4, 2026
9f3c351
Add gh-pull-request skill and fix ci-e2e-debug skill structure
wu-sheng Mar 4, 2026
971b746
Broaden gh-pull-request skill to cover all PR branch pushes
wu-sheng Mar 4, 2026
bf9ac1a
Remove unnecessary argument-hint from gh-pull-request skill
wu-sheng Mar 4, 2026
c50204b
Fix LAL v2 parser for string concat, paren cast, array index, and met…
wu-sheng Mar 4, 2026
4c37583
Add MAL decorate() scope validation and MeterEntity output comparison
wu-sheng Mar 4, 2026
060fa25
Refactor MAL/LAL codegen classes and strengthen LAL v1-v2 checker
wu-sheng Mar 4, 2026
c231526
Add LogData field population in json/yaml parsers and LogData.Builder…
wu-sheng Mar 4, 2026
d1627dd
Add SW_OAL_ENGINE_DEBUG support and runtime debug logging for MAL/LAL…
wu-sheng Mar 4, 2026
5434547
Address Copilot review: rename EntityDescription package, fix grammar…
wu-sheng Mar 4, 2026
33457cd
Restore Maven CI-friendly ${revision} property and flatten-maven-plugin
wu-sheng Mar 4, 2026
729954d
Add JMH benchmarks for MAL/LAL/Hierarchy v1-v2 performance comparison
wu-sheng Mar 4, 2026
aeb9bc1
Refactor MAL codegen helpers, add Claude Code skills doc, update comp…
wu-sheng Mar 5, 2026
9175b2f
Add debug verbosity to license-eye in CI to diagnose dependency resol…
wu-sheng Mar 5, 2026
ea55e8f
Revert releasing scripts to use revision property since flatten-maven…
wu-sheng Mar 5, 2026
d20cff8
Add flatten:flatten before license-eye in CI to resolve ${revision} f…
wu-sheng Mar 5, 2026
e8a8480
Use flatten:flatten install before license-eye in CI to pre-install r…
wu-sheng Mar 5, 2026
d89a993
Merge origin/master, add .flattened-pom.xml to .gitignore
wu-sheng Mar 5, 2026
441febe
Skip GPG in CI dependency license install step, update MAL benchmark …
wu-sheng Mar 5, 2026
933b253
Rich expected validation for MAL/LAL checker tests
wu-sheng Mar 5, 2026
139e3f5
Remove PowerMock dependency, replace with ReflectUtil in server-testing
wu-sheng Mar 5, 2026
7f723c3
Add telegraf-rules and zabbix-rules to MAL checker tests, document in…
wu-sheng Mar 5, 2026
33429f7
Add full branch coverage for k8s-service network-profiling-slow-trace…
wu-sheng Mar 5, 2026
2ec4b91
Fix LALExpressionExecutionTest: handle List input data and mock Proce…
wu-sheng Mar 5, 2026
783b693
Extract entity function labels in MalInputDataGenerator, regenerate .…
wu-sheng Mar 5, 2026
c37e21f
Fix ReflectUtil overload ambiguity in DSLTest/DSLSecurityTest, update…
wu-sheng Mar 5, 2026
dbd84ee
Merge remote-tracking branch 'origin/master' into groovy-replace
wu-sheng Mar 5, 2026
0caadcc
Fail on v1 runtime errors in MalComparisonTest auto-generated data pa…
wu-sheng Mar 5, 2026
9064799
Remove initExp from MAL config, update hierarchy rule docs, add Javad…
wu-sheng Mar 6, 2026
0dcc999
Rename SW_OAL_ENGINE_DEBUG to SW_DYNAMIC_CLASS_ENGINE_DEBUG
wu-sheng Mar 6, 2026
1b87a40
Align docker-compose BanyanDB image with e2e env
wu-sheng Mar 6, 2026
14d52c6
Fix oal.md doc link path, update CLAUDE.md env var references
wu-sheng Mar 6, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
41 changes: 41 additions & 0 deletions .claude/skills/ci-e2e-debug/SKILL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
---
name: ci-e2e-debug
description: Download and inspect CI e2e test logs from GitHub Actions artifacts. Use when investigating e2e test failures in CI.
argument-hint: "<RUN_ID or GitHub Actions URL>"
---

# CI E2E Debug Skill

Download test log artifacts from a GitHub Actions CI run and inspect them for errors.

## Steps

1. **Find the artifact**: Use `gh api` to list artifacts for the given CI run:
```bash
gh api repos/apache/skywalking/actions/runs/<RUN_ID>/artifacts --jq '.artifacts[] | {id: .id, name: .name}'
```

2. **Download and extract**: Download the artifact zip and extract it:
```bash
cd /tmp && rm -rf e2e-debug-logs && mkdir e2e-debug-logs && cd e2e-debug-logs
gh api repos/apache/skywalking/actions/artifacts/<ARTIFACT_ID>/zip > artifact.zip
unzip -o artifact.zip
```

3. **Inspect OAP logs**: Look for errors in the OAP server logs:
```bash
# Find OAP log files
find /tmp/e2e-debug-logs -name "skywalking-oap-*.log" -o -name "oap.log"
# Check for errors
grep -E "ERROR|Exception|FATAL|CannotCompileException" <log_file> | head -30
```

4. **Inspect other component logs**: Check BanyanDB, UI, and other pod logs as needed.

5. **Report findings**: Summarize the root cause error from the logs.

## Notes
- CI artifacts are automatically uploaded by the e2e test framework to `$SW_INFRA_E2E_LOG_DIR`
- Log files are organized by namespace/pod name
- OAP init pods may have different errors than the main OAP pod — check all of them
- Common errors: MAL/LAL/OAL compilation failures, storage connection issues, module initialization errors
109 changes: 109 additions & 0 deletions .claude/skills/compile/SKILL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,109 @@
---
name: compile
description: Build SkyWalking OAP server, run javadoc checks, and verify checkstyle. Use to validate changes before submitting a PR.
argument-hint: "[all|backend|javadoc|checkstyle|module-name]"
---

# Compile & Verify

Build the project and run static checks matching CI.

## Prerequisites

- JDK 11, 17, or 21 (LTS versions)
- Maven 3.6+ (use `./mvnw` wrapper)

## Maven profiles

- `backend` (default): Builds OAP server modules
- `ui` (default): Builds web application
- `dist` (default): Creates distribution packages
- `all`: Builds everything including submodule initialization

## Commands by argument

### `all` or no argument — full CI build

```bash
./mvnw clean flatten:flatten install javadoc:javadoc -B -q -Pall \
-Dmaven.test.skip \
-Dcheckstyle.skip \
-Dgpg.skip
```

### `backend` — backend only (faster)

```bash
./mvnw clean flatten:flatten package -Pbackend,dist -Dmaven.test.skip
```

### `javadoc` — javadoc check only

Javadoc requires delombok output, so `install` must run first:

```bash
./mvnw clean flatten:flatten install javadoc:javadoc -B -q -Pall \
-Dmaven.test.skip \
-Dcheckstyle.skip \
-Dgpg.skip
```

Running `javadoc:javadoc` alone without `install` will miss errors because `${delombok.output.dir}` won't be populated.

### `checkstyle` — checkstyle only

```bash
./mvnw -B -q clean flatten:flatten checkstyle:check
```

### Module name — single module build

```bash
./mvnw clean flatten:flatten package -pl oap-server/analyzer/<module-name> -Dmaven.test.skip
```

## Reading javadoc output

Maven prefixes all javadoc output with `[ERROR]`, but the actual severity is in the message after the line number. Only lines containing `error:` fail the build; lines with `warning:` do not.

```
[ERROR] Foo.java:42: error: bad use of '>' ← ACTUAL ERROR (must fix)
[ERROR] Foo.java:50: warning: no @param for <T> ← WARNING (does not fail build)
```

### Common javadoc errors

| Error | Cause | Fix |
|-------|-------|-----|
| `bad use of '>'` | Bare `>` in javadoc HTML (e.g., `->` in `<pre>` blocks) | Use `{@code ->}` or `-&gt;` |
| heading out of sequence | Heading level skips the expected hierarchy | See heading rules below |
| reference not found | `{@link Foo#bar()}` with wrong signature | Match exact parameter types: `{@link Foo#bar(ArgType)}` |

### Javadoc heading rules (JDK 13+)

Strict heading validation was introduced in JDK 13. JDK 11 does **not** enforce it, but JDK 17/21/25 do. Write headings correctly for forward compatibility:

| Javadoc location | Start heading at |
|---|---|
| Class, interface, enum, package, module | `<h2>` |
| Constructor, method, field | `<h4>` |
| Standalone HTML files (`doc-files/`) | `<h1>` |

The generated javadoc page uses `<h1>` for the class name and `<h3>` for member sections (Methods, Fields, etc.), so class-level subsections must use `<h2>` and method-level subsections must use `<h4>` to maintain proper nesting.

## CI reference

CI uses JDK 11 on Linux. The `dist-tar` job runs:

```bash
./mvnw clean flatten:flatten install javadoc:javadoc -B -q -Pall \
-Dmaven.test.skip \
-Dcheckstyle.skip \
-Dgpg.skip
```

The `code-style` job runs:

```bash
./mvnw -B -q clean flatten:flatten checkstyle:check
```
65 changes: 65 additions & 0 deletions .claude/skills/generate-classes/SKILL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
---
name: generate-classes
description: Generate bytecode classes from DSL scripts (MAL, OAL, LAL, Hierarchy). Runs the compiler and dumps .class files for inspection.
argument-hint: "<mal|oal|lal|hierarchy|all>"
---

# Generate DSL Classes

Run the v2 compiler (ANTLR4 + Javassist) to generate bytecode classes from DSL scripts and dump `.class` files to disk for inspection.

## Commands by argument

### `mal` — MAL expression classes

```bash
./mvnw test -pl test/script-cases/script-runtime-with-groovy/mal-lal-v1-v2-checker \
-Dtest=MalComparisonTest -DfailIfNoTests=false -Dcheckstyle.skip
```

Output location: `test/script-cases/scripts/mal/**/*.generated-classes/`

### `oal` — OAL metrics/dispatcher/builder classes

```bash
./mvnw test -pl oap-server/oal-rt \
-Dtest=RuntimeOALGenerationTest -DfailIfNoTests=false -Dcheckstyle.skip
```

Output location: `oap-server/oal-rt/target/test-classes/metrics/`, `metrics/builder/`, `dispatcher/`

### `lal` — LAL filter/extractor classes

```bash
./mvnw test -pl test/script-cases/script-runtime-with-groovy/mal-lal-v1-v2-checker \
-Dtest=LalComparisonTest -DfailIfNoTests=false -Dcheckstyle.skip
```

Output location: `test/script-cases/scripts/lal/**/*.generated-classes/`

### `hierarchy` — Hierarchy rule classes

```bash
./mvnw test -pl test/script-cases/script-runtime-with-groovy/hierarchy-v1-v2-checker \
-Dtest=HierarchyRuleComparisonTest -DfailIfNoTests=false -Dcheckstyle.skip
```

Output location: `test/script-cases/scripts/hierarchy-rule/*.generated-classes/`

### `all` or no argument — generate all DSLs

Run all four commands above sequentially.

## After generation

Print the output location for the requested DSL so the user knows where to find the generated `.class` files. Use `javap` to decompile:

```bash
javap -c -p <path-to-class-file>
```

## Cleaning generated classes

```bash
./mvnw clean -pl test/script-cases/script-runtime-with-groovy/mal-lal-v1-v2-checker,test/script-cases/script-runtime-with-groovy/hierarchy-v1-v2-checker
```
112 changes: 112 additions & 0 deletions .claude/skills/gh-pull-request/SKILL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,112 @@
---
name: gh-pull-request
description: 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 Branch Workflow

Run pre-flight checks, commit, push, and optionally create a PR.

## Pre-flight checks

Run these checks before every commit+push and fix any failures:

### 1. Compile and checkstyle

```bash
# Checkstyle
./mvnw -B -q clean checkstyle:check

# Full build (compile + javadoc)
./mvnw clean flatten:flatten install javadoc:javadoc -B -q -Pall \
-Dmaven.test.skip \
-Dcheckstyle.skip \
-Dgpg.skip
```

### 2. License header check

```bash
license-eye header check
```

If invalid files are found, fix with `license-eye header fix` and re-check.

## Commit and push

After checks pass, commit and push:

```bash
git add <files>
git commit -m "<message>"
git push -u origin <branch-name>
```

### Branch strategy
- **Never work directly on master branch**
- If on master, create a new branch first: `git checkout -b feature/<name>` or `git checkout -b fix/<name>`

## Create PR (if not yet created)

Check whether a PR already exists for the current branch:

```bash
gh pr view --json number 2>/dev/null
```

If no PR exists, create one:

### PR title
Summarize the changes concisely. Examples:
- `Fix BanyanDB query timeout issue`
- `Add support for OpenTelemetry metrics`

### PR description

Read `.github/PULL_REQUEST_TEMPLATE` and use its **exact format with checkboxes**. Do NOT use a custom summary format.

Key template sections — uncomment the relevant one:

**For Bug Fixes:**
```
### Fix <bug description or issue link>
- [ ] Add a unit test to verify that the fix works.
- [ ] Explain briefly why the bug exists and how to fix it.
```

**For New Features:**
```
### <Feature description>
- [ ] If this is non-trivial feature, paste the links/URLs to the design doc.
- [ ] Update the documentation to include this new feature.
- [ ] Tests(including UT, IT, E2E) are added to verify the new feature.
- [ ] If it's UI related, attach the screenshots below.
```

**For Performance Improvements:**
```
### Improve the performance of <class or module or ...>
- [ ] Add a benchmark for the improvement.
- [ ] The benchmark result.
- [ ] Links/URLs to the theory proof or discussion articles/blogs.
```

**Always include:**
```
- [ ] If this pull request closes/resolves/fixes an existing issue, replace the issue number. Closes #<issue number>.
- [ ] Update the [`CHANGES` log](https://github.com/apache/skywalking/blob/master/docs/en/changes/changes.md).
```

### Create command

```bash
gh pr create --title "<title>" --body "$(cat <<'EOF'
<PR body from template>
EOF
)"
```

### Post-creation
- Add `copilot` as a reviewer: `gh pr edit <number> --add-reviewer copilot`
- Do NOT add AI assistant as co-author. Code responsibility is on the committer's hands.
- Return the PR URL when done.
62 changes: 62 additions & 0 deletions .claude/skills/license/SKILL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
---
name: license
description: Check and fix Apache 2.0 license headers and dependency licenses using skywalking-eyes. Use before submitting a PR.
argument-hint: "[check|fix|deps]"
---

# License Checks

Check and fix license compliance using [skywalking-eyes](https://github.com/apache/skywalking-eyes). Two CI jobs use this tool:

1. **license-header** — verifies all source files have Apache 2.0 headers
2. **dependency-license** — verifies the LICENSE file matches current dependencies

## Steps

### Header check (default, or `check` argument)

```bash
license-eye header check
```

- **All valid**: Output shows `valid: N, invalid: 0` — nothing to do.
- **Invalid files found**: Fix with `license-eye header fix`, then re-check.

### Header fix (`fix` argument)

```bash
license-eye header fix
license-eye header check
```

### Dependency license check (`deps` argument)

This regenerates the LICENSE file from dependency metadata and checks for drift:

```bash
license-eye dependency resolve --summary ./dist-material/release-docs/LICENSE.tpl || exit 1
if [ ! -z "$(git diff -U0 ./dist-material/release-docs/LICENSE)" ]; then
echo "LICENSE file is not updated correctly"
git diff -U0 ./dist-material/release-docs/LICENSE
fi
```

If the LICENSE file changed, review the diff and commit it. **Important**: CI runs on Linux — some dependencies have platform-specific variants. If you're on macOS/Windows, the LICENSE diff may be a platform artifact. Verify before committing.

## Rules

Configuration is in `.licenserc.yaml`:
- Java, XML, YAML/YML files require Apache 2.0 headers
- JSON and Markdown files are excluded (JSON doesn't support comments)
- Generated files and certain vendor paths are excluded
- SPI service files (`META-INF/services/`) require headers (use `#` comment style)

## Installation

```bash
# Same version as CI (pinned commit)
go install github.com/apache/skywalking-eyes/cmd/license-eye@5b7ee1731d036b5aac68f8bd3fc9e6f98ada082e

# Or via Homebrew (macOS)
brew install license-eye
```
Loading
Loading