vectordotdev/vector · error

transform output misconfigured - output for port

Error message

transform output misconfigured - output for port {:?} missing

What it means

Same pattern as the source case: possible_definitions unwraps a transform's output for a port that the lookup already asserted exists; the None branch is unreachable by contract. A panic means the transform registry returned None for a transform that was just found — an inconsistency in component metadata or the build unit graph. It signals a code-level bug rather than user config error.

Solutions

  1. Fix the transform's output_for_port so advertised ports always resolve to Some(output)
  2. cargo clean and rebuild to eliminate stale-artifact inconsistencies
  3. Report the triggering topology as a Vector bug if on stock components
Defensive patterns

Strategy: validation

Validate before calling

// Validate topology config before schema expansion
vector validate config.yaml

Prevention

When it happens

Trigger: A transform whose output_for_port returns Ok(None) for an advertised port; custom transform development; mismatched crate versions in an embedded build.

Common situations: Writing a custom Vector transform with named outputs; stale incremental build mixing old and new component code.

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

Appendix: source

Thrown at src/topology/schema.rs:76

            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);
        }
    }

    Ok(definitions)

View on GitHub (pinned to bdb87aeaa4)