tvkitchen / countertop

The entry point for developers who want to set up a TV Kitchen.
https://tv.kitchen
GNU Lesser General Public License v3.0
6 stars 2 forks source link

Certain topologies can result in incomplete duplicate streams #159

Closed slifty closed 2 years ago

slifty commented 2 years ago

Describe the bug

I have a complex topology that involves a "file recorder" appliance (currently being developed).

The file recorder as two input types (text, and segment starts)

I'm seeing a topology with TWO streams to this appliance

Stream A has two tributaries (text and segment) Stream B has a single tributary (segment)

To reproduce...

I believe that what it takes to reproduce this is create a toplogy involving an appliance where both input types are fulfilled.

Expected behavior

This should result in a SINGLE stream that uses both, rather than two streams.

slifty commented 2 years ago

I think this is happening because the topology is generated by adding one station at a time -- in my example case the segment station was added before the textstation.

This means that at the moment when the segment station is added it created a stream with JUST the segment tributary (Stream A in my example). Then when the text station was added it created a NEW stream that included both test and segment tributaries (STREAM B in my example).

I have to think about this more carefully, but I am guessing that after each set of streams is added the kitchen should prune away any station streams whose tributaries are an explicit subset of another (and then prune any streams that relied on those streams)