Repository navigation
router: apply input routes with a single input and output - #12596
Conversation
With one input and one output, the router connected them directly and returned before applying the routes of the configuration. Route conditions were never evaluated, so records matching no route still reached the output. Take the shortcut only when no input has routes. Signed-off-by: Eduardo Silva <eduardo@chronosphere.io>
…output Signed-off-by: Eduardo Silva <eduardo@chronosphere.io>
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
📝 Walkthrough
Merge Risk: ⚪ Minimal · up to
|
Problem
With exactly one input and one output,
flb_router_io_set()connects the twodirectly and returns before applying the
routesof the configuration. Theinput gets no direct routes, so route conditions are never evaluated: records
that match no route still reach the output.
Before this change the record is printed. After it, it is not, the same as
when the pipeline has more inputs or outputs.
Change
Take the 1:1 shortcut only when no input has routes. Inputs with routes go
through the regular setup and the router configuration.
Testing
New integration tests in
tests/integration/scenarios/out_stdoutfor amatching and a non-matching route with one input and one output. Both fail on
masterand pass with this change.Summary by CodeRabbit