{"record":{"id":"82e1d093812a52a1","repo":"vectordotdev/vector","slug":"errors-ignored","errorCode":null,"errorMessage":"errors ignored","messagePattern":"errors ignored","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/config/graph.rs","lineNumber":85,"sourceCode":"    pub fn new(\n        sources: &IndexMap<ComponentKey, SourceOuter>,\n        transforms: &IndexMap<ComponentKey, TransformOuter<String>>,\n        sinks: &IndexMap<ComponentKey, SinkOuter<String>>,\n        schema: schema::Options,\n        wildcard_matching: WildcardMatching,\n    ) -> Result<Self, Vec<String>> {\n        Self::new_inner(sources, transforms, sinks, false, schema, wildcard_matching)\n    }\n\n    pub fn new_unchecked(\n        sources: &IndexMap<ComponentKey, SourceOuter>,\n        transforms: &IndexMap<ComponentKey, TransformOuter<String>>,\n        sinks: &IndexMap<ComponentKey, SinkOuter<String>>,\n        schema: schema::Options,\n        wildcard_matching: WildcardMatching,\n    ) -> Self {\n        Self::new_inner(sources, transforms, sinks, true, schema, wildcard_matching)\n            .expect(\"errors ignored\")\n    }\n\n    fn new_inner(\n        sources: &IndexMap<ComponentKey, SourceOuter>,\n        transforms: &IndexMap<ComponentKey, TransformOuter<String>>,\n        sinks: &IndexMap<ComponentKey, SinkOuter<String>>,\n        ignore_errors: bool,\n        schema: schema::Options,\n        wildcard_matching: WildcardMatching,\n    ) -> Result<Self, Vec<String>> {\n        let mut graph = Graph::default();\n        let mut errors = Vec::new();\n\n        // First, insert all of the different node types\n        for (id, config) in sources.iter() {\n            graph.nodes.insert(\n                id.clone(),\n                Node::Source {","sourceCodeStart":67,"sourceCodeEnd":103,"githubUrl":"https://github.com/vectordotdev/vector/blob/bdb87aeaa4c4ff27c0ba643c1c77b21bf2ef4013/src/config/graph.rs#L67-L103","documentation":"`new_unchecked` builds a config graph without re-checking component names because they were validated earlier; the fallible `new_inner` result is asserted with `expect(\"errors ignored\")`. The panic means the \"already validated\" assumption was violated and graph construction still failed.","triggerScenarios":"Constructing a ConfigGraph from sources/transforms/sinks whose identifiers were never run through the normal name-validation pass, e.g. programmatic config building that skips validation.","commonSituations":"Embedding Vector's config library and building graphs directly; tests constructing outer-component maps by hand; refactors that weaken the earlier validation pass.","solutions":["Run the standard config validation (name checks) before calling `new_unchecked`.","Switch to the checked constructor if building graphs outside the normal loading pipeline.","Fix the component keys so they pass name validation."],"exampleFix":"// before\nlet graph = ConfigGraph::new_unchecked(&sources, &transforms, &sinks, schema, wildcard);\n// after\nvalidate_component_names(&sources, &transforms, &sinks)?;\nlet graph = ConfigGraph::new_unchecked(&sources, &transforms, &sinks, schema, wildcard);","handlingStrategy":"validation","validationCode":"// Before constructing the graph, validate identifiers:\nfor key in sources.keys().chain(transforms.keys()).chain(sinks.keys()) {\n    assert!(is_valid_component_name(&key.to_string()), \"invalid component id: {key}\");\n}","typeGuard":null,"tryCatchPattern":"match ConfigGraph::new_inner(&sources, &transforms, &sinks, false, schema, wildcard) { Ok(g) => g, Err(errs) => { eprintln!(\"graph errors: {errs:?}\"); std::process::exit(1); } }","preventionTips":["Always load configs through the standard pipeline (loader + validation) instead of building graphs directly.","Run `vector validate` before `vector run` in CI.","Keep component names lowercase alphanumeric with dashes/underscores."],"tags":["config","graph","invariant-violation"],"backgroundTag":"internal-invariant-violation","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"}