{"record":{"id":"dfab8705c0d5625a","repo":"vectordotdev/vector","slug":"config-should-not-have-any-errors","errorCode":null,"errorMessage":"config should not have any errors","messagePattern":"config should not have any errors","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/components/validation/runner/mod.rs","lineNumber":520,"sourceCode":"                RunnerOutput::External(rx),\n                maybe_encoder,\n            ))\n        }\n    }\n}\n\nfn spawn_component_topology(\n    config_builder: ConfigBuilder,\n    topology_task_coordinator: &TaskCoordinator<Configuring>,\n    extra_context: ExtraContext,\n) {\n    let topology_started = topology_task_coordinator.track_started();\n    let topology_completed = topology_task_coordinator.track_completed();\n    let mut topology_shutdown_handle = topology_task_coordinator.register_for_shutdown();\n\n    let mut config = config_builder\n        .build()\n        .expect(\"config should not have any errors\");\n\n    // It's possible we could extend the framework to allow specifying logic to\n    // handle that, but I don't see much value currently since the healthcheck is\n    // not enforced for components, and it doesn't impact the internal telemetry.\n    config.healthchecks.enabled = false;\n\n    _ = std::thread::spawn(move || {\n        let test_runtime = Builder::new_current_thread()\n            .enable_all()\n            .build()\n            .expect(\"should not fail to build current-thread runtime\");\n\n        test_runtime.block_on(async move {\n            info!(\"Building component topology...\");\n\n            let (topology, mut crash_rx) =\n                RunningTopology::start_init_validated(config, extra_context)\n                    .await","sourceCodeStart":502,"sourceCodeEnd":538,"githubUrl":"https://github.com/vectordotdev/vector/blob/bdb87aeaa4c4ff27c0ba643c1c77b21bf2ef4013/src/components/validation/runner/mod.rs#L502-L538","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","solutions":["Print/inspect the build error: replace the expect temporarily with match to log why the config failed validation.","Fix the test case's component config (field names, required options, valid types).","Ensure component IDs in the test topology are unique and connections reference existing IDs.","Update test configs after any config schema change to the component under test."],"exampleFix":"// before\nlet mut config = config_builder.build().expect(\"config should not have any errors\");\n// after\nlet mut config = config_builder.build().unwrap_or_else(|e| {\n    panic!(\"validation test config invalid: {e:?}\")\n});","handlingStrategy":"validation","validationCode":"let config = config_builder.build().unwrap_or_else(|errors| panic!(\"validation test config invalid: {errors:?}\"));","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Validate the test topology config standalone (vector validate) before wiring it into the validation framework.","Keep component IDs unique and connections referencing existing IDs in test cases.","Re-run validation tests whenever a component's config schema changes."],"tags":["config","validation","topology"],"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"}