vectordotdev/vector · error

validation failure(s).

Error message

{} validation failure(s).

What it means

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

Solutions

  1. Read the printed per-example failure output above the error.
  2. Fix the component docs/metadata that generates the example, or regenerate with `make generate-docs`.
  3. Validate the failing config manually: `cargo vdev run <config> validate` style check, then re-run the check.
Defensive patterns

Strategy: try-catch

Validate before calling

for f in config/examples/**/*.yaml: vector validate --no-environment "$f"

Try / catch

match cmd.status() { Ok(s) if s.success() => Ok(()), Ok(s) => bail!("validation failed: {s}"), Err(e) => bail!("spawn failed: {e}") }

Prevention

When it happens

Trigger: One or more generated component example configs fail `vector validate` (invalid config schema, unresolvable options, failed healthcheck during validation).

Common situations: 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.

Understand the failure class

Background: "Invalid value" and "allowed values are" config errors: what your library rejected and how to fix it — this error's family across 41 libraries.

Related errors


AI-assisted analysis of vectordotdev/vector@bdb87aeaa4 (2026-09-16). Data as JSON: /api/errors/ab57219bb05767b5. Report an issue: GitHub.

Appendix: source

Thrown at vdev/src/commands/check/component_examples.rs:109

            });
        }
    });

    let failures = failures
        .into_inner()
        .expect("Validation failure lock poisoned");
    println!(
        "Validated {} examples ({skipped} skipped).",
        total - skipped
    );
    if failures.is_empty() {
        println!("All examples passed.");
        return Ok(());
    }
    for failure in &failures {
        println!("{failure}");
    }
    bail!("{} validation failure(s).", failures.len())
}

fn validation_cases(
    examples_dir: &Path,
    docs: &Value,
) -> Result<(Vec<ValidationCase>, usize, usize)> {
    let components = docs
        .get("components")
        .and_then(Value::as_object)
        .ok_or_else(|| anyhow!("Documentation model has no components"))?;
    let mut cases = Vec::new();
    let mut total = 0;
    let mut skipped = 0;

    for (kind, components_of_kind) in components {
        let components_of_kind = components_of_kind
            .as_object()
            .ok_or_else(|| anyhow!("Component kind {kind} is not an object"))?;

View on GitHub (pinned to bdb87aeaa4)