Skip to content

Filters are processed in lexicographic order instead of numeric order, causing incorrect pipeline execution #1854

@yllada

Description

@yllada

Acknowledgements

Describe the bug

When multiple filters/steps are configured in a pipeline, they are being processed in lexicographic order (alphabetical) instead of numeric order. This causes filters with higher ids (e.g., 10000) to be processed before lower numbers (e.g., 701), leading to incorrect pipeline execution and unexpected behavior with drop conditions.

Regression Issue

  • Select this option if this issue appears to be a regression.

Expected Behavior

Filters/steps should be processed in ascending numerical order based on their numeric identifiers (701 → 702 → 703 → ... → 10000). This ensures that pipeline steps execute in the intended sequence.

Current Behavior

The system processes files/filters using lexicographic order (like Go's filepath.Walk), which means:

  • "10000" is processed before "701" (because "1" comes before "7" alphabetically)
  • This causes filters to execute out of order
  • In testing, when attempting to add a drop condition as a new step, it wasn't being recognized properly because previous steps were being processed out of sequence

Reproduction Steps

  1. Create a pipeline with multiple filters/steps.
  2. Configure a discard condition in one of the steps.
  3. Run two tests:
    • Test A: Add only the step with the necessary discard condition.
    • Test B: Add the complete original filter plus the step with the discard condition.
  4. Observe that in Test A, the drop condition is not applied (the system doesn't "recognize" it)
  5. In Test B, when all the original filters are present, the discard condition works correctly.

Possible Solution

No response

Additional Information/Context

No response

UTMStack Version

11.2.3

Operating System and version

Ubuntu 24.4

Hypervisor and Version | Server Vendor and Model

n/a

Browser and version

145.0.7632.116 (Build oficial) (64 bits)

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

Projects

Status

👀 In review

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions