vectordotdev/vector · error

transform must exist - already found inputs

Error message

transform must exist - already found inputs

What it means

In `possible_definitions` (src/topology/schema.rs:74), the code resolves each transform via `transform_output_for_port(...).expect("transform must exist - already found inputs")`. The invariant is that inputs were enumerated in a previous pass, so the transform must exist in the config; a None means the schema-resolution cache/iteration found inputs for a transform that no longer resolves.

Solutions

  1. Ensure the Config is immutable and consistent while schema definitions are being computed.
  2. Verify every transform referenced in `inputs` has a corresponding transform entry in the config.
  3. Rebuild the config from a single parse rather than mutating it programmatically.
Defensive patterns

Strategy: validation

Validate before calling

// every transform referenced by inputs must exist in config.transforms
for t in &config.transforms {
    for inp in &t.inputs { assert!(config.transform_inputs(inp).is_some(), "missing transform {inp}"); }
}

Prevention

When it happens

Trigger: Schema definition resolution encountering a transform key whose inputs were found but whose transform definition is absent — usually from inconsistent config iteration or a recursive call with a stale/partial config.

Common situations: Topology validation of hand-built Config objects in tests; config with references to transforms removed mid-resolution; custom tooling that mutates Config between passes.

Understand the failure class

Background: "This is a bug, please report it": internal invariant violations, unreachable panics, and SNH errors explained — this error's family across 47 libraries.

Related errors


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

Appendix: source

Thrown at src/topology/schema.rs:74

            }

            definitions.append(&mut source_definition);
        }

        // If the input is a transform, the output is merged into the top-level schema
        if let Some(inputs) = config.transform_inputs(key) {
            let input_definitions =
                possible_definitions(inputs, config, enrichment_tables.clone(), cache)?;

            let mut transform_definition = input.with_definitions(
                config
                    .transform_output_for_port(
                        key,
                        &input.port,
                        enrichment_tables.clone(),
                        &input_definitions,
                    )
                    .expect("transform must exist - already found inputs")
                    .unwrap_or_else(|| {
                        unreachable!(
                            "transform output misconfigured - output for port {:?} missing",
                            &input.port
                        )
                    })
                    .schema_definitions(config.schema_enabled())
                    .values()
                    .cloned(),
            );

            if contains_never(&transform_definition) {
                return Err(Error::ContainsNever);
            }

            definitions.append(&mut transform_definition);
        }
    }

View on GitHub (pinned to bdb87aeaa4)