-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
enhancement(file source): Better multi-line support #1852
Conversation
…ity) Signed-off-by: MOZGIII <mike-n@narod.ru>
b179c3d
to
7a685d0
Compare
Signed-off-by: MOZGIII <mike-n@narod.ru>
7a685d0
to
a4eaec4
Compare
Signed-off-by: MOZGIII <mike-n@narod.ru>
Signed-off-by: MOZGIII <mike-n@narod.ru>
Signed-off-by: MOZGIII <mike-n@narod.ru>
977f82b
to
689a6c2
Compare
Signed-off-by: MOZGIII <mike-n@narod.ru>
Signed-off-by: MOZGIII <mike-n@narod.ru>
Signed-off-by: MOZGIII <mike-n@narod.ru>
Signed-off-by: MOZGIII <mike-n@narod.ru>
Signed-off-by: MOZGIII <mike-n@narod.ru>
@bruceg mind reviewing this? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mostly pretty good, particularly the internal documentation. I just have a few questions I'd like to see answered before approving this. The tests look like they cover a good number of cases, which is reassuring.
Signed-off-by: MOZGIII <mike-n@narod.ru>
fd917f8
to
e716ecf
Compare
Signed-off-by: MOZGIII <mike-n@narod.ru>
Signed-off-by: MOZGIII <mike-n@narod.ru>
Signed-off-by: MOZGIII <mike-n@narod.ru>
Signed-off-by: MOZGIII <mike-n@narod.ru>
f82b28b
to
93a5a26
Compare
Signed-off-by: MOZGIII <mike-n@narod.ru>
Signed-off-by: MOZGIII <mike-n@narod.ru>
Signed-off-by: MOZGIII <mike-n@narod.ru>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. Just one question, but that shouldn't hold up merging.
if let Some(ref multiline_config) = multiline_config { | ||
Box::new(LineAgg::new( | ||
rx, | ||
multiline_config.try_into().unwrap(), // validated in build |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One last thought. Is there any way for this created line_agg::Config
to be stored where it is parsed in build
and used here instead of re-parsing?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tried going that route - but ended up wanting to redo the whole file
source configuration approach. I think we need to address this systematically - validate and update all the units. In short, the idea I had is to have two layers - a serializable/deserializeable config and a "processed" config, that's been validated and has values converted into the proper types.
So, in short - I see how ugly the current approach is - and we definitely should fix this, but even if we'll do it just with the file
source - this is one of the part where I deliberately decided to leave the current approach unchanged.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I created #1895
required = false | ||
description = """\ | ||
Multiline parsing configuration. \ | ||
If not speicified, multiline parsing is disabled.\ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Spelling issue. Should be "specified."
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@rcollette That spelling error has been addressed in later code. Thanks for letting us know though!
Closes #1431.
Ref fluent/fluent-bit#337.
TODO:
behavior tests?no behavior tests for sources