Skip to content

memory table untestable unless test data is given to direct input #24494

@jiping-s

Description

@jiping-s

A note for the community

In unit tests, the transforms referenced by memory tables need input data directly on their inputs, otherwise test fails. It's impractical for anything but simplest setup.

Problem

See example from #24081

If cache_generator does not use demo_logs_processor directly, but:

  demo_logs_processor_2:
    type: "remap"
    inputs: ["demo_logs_processor"]
    source: ""

  cache_generator:
    type: "remap"
    inputs: ["demo_logs_processor_2"]

then vector test throws error:

Failed to build test 'Syslog merge out':
  Transform "cache_generator" has no inputs.

While test data may be injected directly to demo_logs_processor_2 to fix the problem, it's not practical in larger pipelines, because inputs for all memory tables must be injected for all tests, even if some of the tables are not actually touched.

Configuration


Version

0.52.0

Debug Output


Example Data

No response

Additional Context

No response

References

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    type: bugA code related bug.

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions