vectordotdev/vector · error

config should not have any errors

Error message

config should not have any errors

What it means

In the validation runner, the ConfigBuilder built from the test topology is expected to be fully valid; the framework treats any config error as a bug in the test definition rather than a user-facing condition. config_builder.build() returning Err causes this expect panic. It exists because the validation framework constructs its own topology programmatically and assumes it was assembled correctly.

Solutions

  1. Print/inspect the build error: replace the expect temporarily with match to log why the config failed validation.
  2. Fix the test case's component config (field names, required options, valid types).
  3. Ensure component IDs in the test topology are unique and connections reference existing IDs.
  4. Update test configs after any config schema change to the component under test.

Example fix

// before
let mut config = config_builder.build().expect("config should not have any errors");
// after
let mut config = config_builder.build().unwrap_or_else(|e| {
    panic!("validation test config invalid: {e:?}")
});
Defensive patterns

Strategy: validation

Validate before calling

let config = config_builder.build().unwrap_or_else(|errors| panic!("validation test config invalid: {errors:?}"));

Prevention

When it happens

Trigger: run_validation -> spawn_component_topology with a config built from test inputs that fails validation: duplicate component IDs, unknown data types, invalid fields on the component under test, or missing required options in the test config.

Common situations: Writing a new validation test case for a component with an invalid or incomplete config (e.g. wrong field name, missing endpoint), or a component's config schema changed and existing test configs no longer validate.

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/dfab8705c0d5625a. Report an issue: GitHub.

Appendix: source

Thrown at src/components/validation/runner/mod.rs:520

                RunnerOutput::External(rx),
                maybe_encoder,
            ))
        }
    }
}

fn spawn_component_topology(
    config_builder: ConfigBuilder,
    topology_task_coordinator: &TaskCoordinator<Configuring>,
    extra_context: ExtraContext,
) {
    let topology_started = topology_task_coordinator.track_started();
    let topology_completed = topology_task_coordinator.track_completed();
    let mut topology_shutdown_handle = topology_task_coordinator.register_for_shutdown();

    let mut config = config_builder
        .build()
        .expect("config should not have any errors");

    // It's possible we could extend the framework to allow specifying logic to
    // handle that, but I don't see much value currently since the healthcheck is
    // not enforced for components, and it doesn't impact the internal telemetry.
    config.healthchecks.enabled = false;

    _ = std::thread::spawn(move || {
        let test_runtime = Builder::new_current_thread()
            .enable_all()
            .build()
            .expect("should not fail to build current-thread runtime");

        test_runtime.block_on(async move {
            info!("Building component topology...");

            let (topology, mut crash_rx) =
                RunningTopology::start_init_validated(config, extra_context)
                    .await

View on GitHub (pinned to bdb87aeaa4)