apache/skywalking · error · IllegalArgumentException
compile_failed
compile_failed
Error message
LAL YAML parse failure while extracting outputType: {t.getMessage()} What it means
DeltaClassifier.extractLalOutputTypes wraps any Throwable thrown while snakeyaml-parsing LAL content into an LALConfigs object during outputType extraction. The classifier runs on the hot-update path to diff old vs new rule content, so a YAML that does not conform to the LAL schema (wrong key names, bad indentation, non-scalar where a scalar is expected) fails here with code compile_failed. The original parser message and cause are preserved, so the real YAML error is always the nested cause.
Source
Thrown at oap-server/server-admin/runtime-rule/src/main/java/org/apache/skywalking/oap/server/receiver/runtimerule/apply/DeltaClassifier.java:369
private static Map<String, String> lalRuleOutputTypes(final String content) {
if (content == null || content.isEmpty()) {
return Collections.emptyMap();
}
try (StringReader r = new StringReader(content)) {
final LALConfigs configs = new Yaml().loadAs(r, LALConfigs.class);
if (configs == null || configs.getRules() == null) {
return Collections.emptyMap();
}
final Map<String, String> out = new LinkedHashMap<>();
for (final LALConfig c : configs.getRules()) {
final String layer = c.getLayer() == null || c.getLayer().isEmpty()
? "auto" : c.getLayer();
out.put(layer + ":" + c.getName(), c.getOutputType());
}
return Collections.unmodifiableMap(out);
} catch (final Throwable t) {
throw new IllegalArgumentException(
"LAL YAML parse failure while extracting outputType: " + t.getMessage(), t);
}
}
private static String nullToEmpty(final String s) {
return s == null ? "" : s;
}
public static Set<String> enumerateLalRuleKeys(final String content) {
final Set<String> out = new LinkedHashSet<>();
if (content == null || content.isEmpty()) {
return Collections.unmodifiableSet(out);
}
try (StringReader r = new StringReader(content)) {
final LALConfigs configs = new Yaml().loadAs(r, LALConfigs.class);
if (configs == null || configs.getRules() == null) {
return Collections.unmodifiableSet(out);
}View on GitHub (pinned to 102af09b4a)
Solutions
- Read the nested cause message — snakeyaml names the exact line/column of the syntax or mapping error; fix that spot in the LAL content
- Validate the content locally with the same shape: new Yaml().loadAs(new StringReader(content), LALConfigs.class) must return rules with name+layer before submitting
- Check you targeted the right catalog: LAL schema (rules with name/layer/outputType) vs MAL schema (metricPrefix/metricsRules) are not interchangeable
- If hot-updating a rule that previously worked, diff against the last-known-good content to find the edit that broke the YAML
Example fix
# before
rules:
- name: my-rule
layer: general
outputType: "log" # bad indent under layer
# after
rules:
- name: my-rule
layer: general
outputType: "log" Defensive patterns
Strategy: validation
Validate before calling
LALConfigs probe = null;
try (StringReader r = new StringReader(content)) {
probe = new Yaml().loadAs(r, LALConfigs.class);
}
if (probe == null || probe.getRules() == null) throw new ClientSideValidationException("not a LAL document");
for (final LALConfig c : probe.getRules()) {
if (c.getName() == null || c.getName().isEmpty()) throw new ClientSideValidationException("rule without name");
} Try / catch
catch (IllegalArgumentException e) { if (e.getMessage().startsWith("LAL YAML parse failure while extracting outputType")) surface the cause's line/column to the editor; else rethrow; } Prevention
- Always parse-validate LAL content client-side with the same LALConfigs shape before submitting a runtime-rule update
- Quarantine files with tabs or CRLF endings in your lint pipeline
- Run a dry-run/validate endpoint when available before hot-apply
When it happens
Trigger: Submitting a runtime-rule update whose content is invalid LAL YAML — e.g. 'exp:' misspelled, a tab used for indentation, a list where LALConfigs expects a map, or content that is not YAML at all (plain text / a MAL document passed as catalog 'lal'). Any DeltaClassifier.classifyLal call on such content throws IllegalArgumentException before classification completes.
Common situations: Copy-pasting a MAL .yaml into the LAL catalog when uploading via the runtime-rule API; Hand-editing LAL rules in an editor that converts spaces to tabs; Truncation of large rule bodies by a proxy or CLI tool, leaving unterminated YAML; Migrating LAL rules from an older schema where keys were renamed
Related errors
- LAL YAML parsed to empty/malformed — no rules list in {sourc
- LAL YAML parse failure for {sourceName}
- LAL compile failed for rule '{name}' in {sourceName}
- LAL register failed for rule '{ruleName}' in {sourceName}
- YAML parsed to null — empty or malformed rule file: {sourceN
AI-assisted analysis of apache/skywalking@102af09b4a (2026-08-14).
Data as JSON: /api/errors/fc3b305071cd2aef.
Report an issue: GitHub.