vectordotdev/vector · error

already found inputs

Error message

already found inputs

What it means

`expanded_definitions` (src/topology/schema.rs:168) calls `config.transform_outputs(key, ..., &input_definitions).expect("already found inputs")`. Because `input_definitions` were just computed by `possible_definitions`, the transform-outputs lookup cannot fail — inputs were proven to exist. A panic here means the config's transform registry changed or is inconsistent with the inputs that were found.

Solutions

  1. Ensure the transform has a valid outputs definition (schema-aware transforms must return outputs when inputs are provided).
  2. Use configs produced by the standard parser rather than hand-assembled Config structs.
  3. Keep the Config immutable across `possible_definitions` and `expanded_definitions` calls.
Defensive patterns

Strategy: validation

Validate before calling

// transform must resolve outputs for its own inputs before schema expansion
assert!(config.transform_outputs(key, enrichment.clone(), &input_definitions).is_ok());

Prevention

When it happens

Trigger: Calling `expanded_definitions` (via validate_sink_expectations or test_expanded_definition) with a Config whose `transform_inputs(key)` succeeds but whose transform outputs resolver returns Err — i.e. an internally inconsistent or mutated Config.

Common situations: Tests constructing Config fragments by hand where the transform entry lacks outputs metadata; concurrent mutation of the config during validation.

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

Appendix: source

Thrown at src/topology/schema.rs:168

                        // error, but other parts of the topology builder deal with this state.
                        unreachable!("source output misconfigured")
                    });

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

            definitions.append(&mut source_definitions);

        // A transform can receive from multiple inputs, and each input needs to be expanded to
        // a new pipeline.
        } else if let Some(inputs) = config.transform_inputs(key) {
            let input_definitions =
                possible_definitions(inputs, config, enrichment_tables.clone(), &mut merged_cache)?;

            let mut transform_definition = config
                .transform_outputs(key, enrichment_tables.clone(), &input_definitions)
                .expect("already found inputs")
                .iter()
                .find_map(|output| {
                    if output.port == input.port {
                        Some(
                            input.with_definitions(
                                output
                                    .schema_definitions(config.schema_enabled())
                                    .values()
                                    .cloned(),
                            ),
                        )
                    } else {
                        None
                    }
                })
                // If we find no match, it means the topology is misconfigured. This is a fatal
                // error, but other parts of the topology builder deal with this state.
                .expect("transform output misconfigured");

View on GitHub (pinned to bdb87aeaa4)