metrics/filter
's glob implementation is order dependent
#1810
Labels
area:aggregator
All issues pertaining to aggregator
The filter syntax used by the aggregator is currently dependent on the order of alternatives listed in certain cases:
should match any of:
but actually fails to match
msg.errors
.Reading through the code, this is due to the fact that our implementation proceeds after the first alternative matches, with no way of backing up on later failure.
That is, we match:
Potential fix:
This is a bit difficult to fix with our current homegrown glob approach; to solve this properly, we need some form of backtracking (see here for a good explanation of an efficient approach, which is used by the
regexp
package). We may want to consider moving our implementation to either usefilepath.Glob
(or similar; that implementation special cases/
and doesn't support{a,b}
constructs, I don't think) orregexp
(translate our glob syntax into a regex).General Issues
M3Aggregator
N/A; discovered via unittest.
N/A; discovered via unittest.
4. Is there a reliable way to reproduce the behavior? If so, please provide detailed instructions.
See this unittest
The text was updated successfully, but these errors were encountered: