{"record":{"id":"fc3b305071cd2aef","repo":"apache/skywalking","slug":"compile-failed","errorCode":"compile_failed","errorMessage":"LAL YAML parse failure while extracting outputType: {t.getMessage()}","messagePattern":"LAL YAML parse failure while extracting outputType: (.+?)","errorType":"http","errorClass":"IllegalArgumentException","httpStatus":400,"severity":"error","filePath":"oap-server/server-admin/runtime-rule/src/main/java/org/apache/skywalking/oap/server/receiver/runtimerule/apply/DeltaClassifier.java","lineNumber":369,"sourceCode":"\n    private static Map<String, String> lalRuleOutputTypes(final String content) {\n        if (content == null || content.isEmpty()) {\n            return Collections.emptyMap();\n        }\n        try (StringReader r = new StringReader(content)) {\n            final LALConfigs configs = new Yaml().loadAs(r, LALConfigs.class);\n            if (configs == null || configs.getRules() == null) {\n                return Collections.emptyMap();\n            }\n            final Map<String, String> out = new LinkedHashMap<>();\n            for (final LALConfig c : configs.getRules()) {\n                final String layer = c.getLayer() == null || c.getLayer().isEmpty()\n                    ? \"auto\" : c.getLayer();\n                out.put(layer + \":\" + c.getName(), c.getOutputType());\n            }\n            return Collections.unmodifiableMap(out);\n        } catch (final Throwable t) {\n            throw new IllegalArgumentException(\n                \"LAL YAML parse failure while extracting outputType: \" + t.getMessage(), t);\n        }\n    }\n\n    private static String nullToEmpty(final String s) {\n        return s == null ? \"\" : s;\n    }\n\n    public static Set<String> enumerateLalRuleKeys(final String content) {\n        final Set<String> out = new LinkedHashSet<>();\n        if (content == null || content.isEmpty()) {\n            return Collections.unmodifiableSet(out);\n        }\n        try (StringReader r = new StringReader(content)) {\n            final LALConfigs configs = new Yaml().loadAs(r, LALConfigs.class);\n            if (configs == null || configs.getRules() == null) {\n                return Collections.unmodifiableSet(out);\n            }","sourceCodeStart":351,"sourceCodeEnd":387,"githubUrl":"https://github.com/apache/skywalking/blob/102af09b4a56064e22050dded10e2c52e490d040/oap-server/server-admin/runtime-rule/src/main/java/org/apache/skywalking/oap/server/receiver/runtimerule/apply/DeltaClassifier.java#L351-L387","documentation":"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.","triggerScenarios":"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.","commonSituations":"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","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"],"exampleFix":"# before\nrules:\n  - name: my-rule\n    layer: general\n      outputType: \"log\"   # bad indent under layer\n# after\nrules:\n  - name: my-rule\n    layer: general\n    outputType: \"log\"","handlingStrategy":"validation","validationCode":"LALConfigs probe = null;\ntry (StringReader r = new StringReader(content)) {\n    probe = new Yaml().loadAs(r, LALConfigs.class);\n}\nif (probe == null || probe.getRules() == null) throw new ClientSideValidationException(\"not a LAL document\");\nfor (final LALConfig c : probe.getRules()) {\n    if (c.getName() == null || c.getName().isEmpty()) throw new ClientSideValidationException(\"rule without name\");\n}","typeGuard":null,"tryCatchPattern":"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; }","preventionTips":["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"],"tags":["yaml","lal","runtime-rule","validation"],"backgroundTag":null,"analyzedSha":"102af09b4a56064e22050dded10e2c52e490d040","analyzedAt":"2026-08-14T10:47:52.647Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}