WIP: Fix logic for regular expressions in topic_filter#944
WIP: Fix logic for regular expressions in topic_filter#944MichaelOrlov wants to merge 1 commit intorollingfrom
Conversation
Signed-off-by: Michael Orlov <michael.orlov@apex.ai>
I don't think this rule makes sense to me. If I specify If that's the case, then I think we should have a large warning right at the beginning, if the user specifies |
I think the rule makes a lot of sense to be consistent in logic. I can envision a real case when command line could be patched by some script adding |
|
Fixing logic for filtering messages in topic_filter to respect
record_options.all,regexandtopic list.Current logic for filtering messages in
TopicFilterdoesn't respectrecord_options.allin case if defined topic list at the same time.If topic name not in
topic listbut match withregexit's still will be filtered out. i.e.regexdoesn't work if topic list not empty and topic name not intopic list.Also if
record_options.allequalfalseandtopic_namedoesn't match with other filtersTopicFilterwill not filter out such topics.Expected behavior :
record_options.allltakes precedence overregexandtopic listtopic listshouldn't have precedence overregex. They should be addition to each other.TopicFilter::take_topic(..)should return false, ifrecord_options.alll == falseand topic name doesn't match with any other filter conditions.