Open nuxwin opened 8 months ago
Hi @nuxwin!
Thanks for submitting this issue - our team has been notified and we'll get back to you as soon as we can! In the mean time, feel free to add any relevant information to this issue.
@nuxwin Thank you for reporting this. This appears to be a problem with how the stage is registered to the Morpheus CLI rather than the stage itself. The input_topic
parameter is being inferred as a tuple. In this case, an empty tuple when input_topic
is not provided. The issue is not seen when stage is used in a Python script like this:
pipeline = LinearPipeline(config)
pipeline.set_source(KafkaSourceStage(config, bootstrap_servers="auto"))
Here input_topic
will default to test_pcap
as expected.
Version
v24.03.00a-runtime
Which installation method(s) does this occur on?
Manual build of release container.
Describe the bug.
The KafkaSourceStage class is designed to initialize with default parameter for input_topic. The parameter expect default to None when not explicitly passed by the caller. However, due to a bug, the parameter is being initialized as empty structures instead of None. This unexpected behavior affects conditional logic later in the code, specifically checks intended to set default value when the parameter is None.
All complex parameters with default None are affected.
Minimum reproducible example
Modified code for logging purpose:
Pipeline run. Relevant part is the from-kafka command.
ai-pf-001-morpheus-pipeline | 2024-03-19 13:24:18,112 - root - DEBUG - input_topic value: ()
ai-pf-001-morpheus-pipeline | Module 'FileBatcher' was successfully registered with 'morpheus' namespace. ai-pf-001-morpheus-pipeline | Module 'FileToDF' was successfully registered with 'morpheus' namespace. ai-pf-001-morpheus-pipeline | Module 'FilterCmFailed' was successfully registered with 'morpheus' namespace. ai-pf-001-morpheus-pipeline | Module 'FilterControlMessage' was successfully registered with 'morpheus' namespace. ai-pf-001-morpheus-pipeline | Module 'FilterDetections' was successfully registered with 'morpheus' namespace. ai-pf-001-morpheus-pipeline | Module 'FromControlMessage' was successfully registered with 'morpheus' namespace. ai-pf-001-morpheus-pipeline | Module 'MLFlowModelWriter' was successfully registered with 'morpheus' namespace. ai-pf-001-morpheus-pipeline | Module 'PayloadBatcher' was successfully registered with 'morpheus' namespace. ai-pf-001-morpheus-pipeline | Module 'Serialize' was successfully registered with 'morpheus' namespace. ai-pf-001-morpheus-pipeline | Module 'ToControlMessage' was successfully registered with 'morpheus' namespace. ai-pf-001-morpheus-pipeline | Module 'WriteToElasticsearch' was successfully registered with 'morpheus' namespace. ai-pf-001-morpheus-pipeline | Module 'WriteToFile' was successfully registered with 'morpheus' namespace. ai-pf-001-morpheus-pipeline | Module 'deserialize' was successfully registered with 'morpheus' namespace. ai-pf-001-morpheus-pipeline | 2024-03-19 13:24:18,112 - root - DEBUG - input_topics before validation: ()