{"record":{"id":"ab57219bb05767b5","repo":"vectordotdev/vector","slug":"validation-failure-s","errorCode":null,"errorMessage":"{} validation failure(s).","messagePattern":"(.+?) validation failure\\(s\\)\\.","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"vdev/src/commands/check/component_examples.rs","lineNumber":109,"sourceCode":"            });\n        }\n    });\n\n    let failures = failures\n        .into_inner()\n        .expect(\"Validation failure lock poisoned\");\n    println!(\n        \"Validated {} examples ({skipped} skipped).\",\n        total - skipped\n    );\n    if failures.is_empty() {\n        println!(\"All examples passed.\");\n        return Ok(());\n    }\n    for failure in &failures {\n        println!(\"{failure}\");\n    }\n    bail!(\"{} validation failure(s).\", failures.len())\n}\n\nfn validation_cases(\n    examples_dir: &Path,\n    docs: &Value,\n) -> Result<(Vec<ValidationCase>, usize, usize)> {\n    let components = docs\n        .get(\"components\")\n        .and_then(Value::as_object)\n        .ok_or_else(|| anyhow!(\"Documentation model has no components\"))?;\n    let mut cases = Vec::new();\n    let mut total = 0;\n    let mut skipped = 0;\n\n    for (kind, components_of_kind) in components {\n        let components_of_kind = components_of_kind\n            .as_object()\n            .ok_or_else(|| anyhow!(\"Component kind {kind} is not an object\"))?;","sourceCodeStart":91,"sourceCodeEnd":127,"githubUrl":"https://github.com/vectordotdev/vector/blob/bdb87aeaa4c4ff27c0ba643c1c77b21bf2ef4013/vdev/src/commands/check/component_examples.rs#L91-L127","documentation":"`vdev check generated-docs` example validation ran Vector against all generated example configs and found at least one failing validation case. Each failure is printed, then the command bails with a count of failures.","triggerScenarios":"One or more generated component example configs fail `vector validate` (invalid config schema, unresolvable options, failed healthcheck during validation).","commonSituations":"A new config option was added or made required and an example still uses the old shape; a generated example references a feature not enabled in the built binary.","solutions":["Read the printed per-example failure output above the error.","Fix the component docs/metadata that generates the example, or regenerate with `make generate-docs`.","Validate the failing config manually: `cargo vdev run <config> validate` style check, then re-run the check."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":"for f in config/examples/**/*.yaml: vector validate --no-environment \"$f\"","typeGuard":null,"tryCatchPattern":"match cmd.status() { Ok(s) if s.success() => Ok(()), Ok(s) => bail!(\"validation failed: {s}\"), Err(e) => bail!(\"spawn failed: {e}\") }","preventionTips":["Validate example configs locally before pushing.","Keep generated examples in sync with component config schemas.","Run `make check-generated-docs` in CI early."],"tags":["validation","config","docs","ci"],"backgroundTag":"invalid-config-value","analyzedSha":"bdb87aeaa4c4ff27c0ba643c1c77b21bf2ef4013","analyzedAt":"2026-09-16T02:53:35.741Z","contentChangedAt":"2026-09-16T02:53:35.741Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}