-
Notifications
You must be signed in to change notification settings - Fork 233
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
Fix panic when parsing invalid lines #579
Conversation
@GrgDev can you check my thinking here? @m-barthelemy @twskipper if you have a chance, could you give this branch a spin to make sure it fixes the panic in your real world use cases, not just in unit tests? |
The line ``` |h|#consumer:Kafka::SharedConfigurationConsumer,topic:shared_configuration_update,partition:1,consumer_group:tc_rc_us ``` caused a panic because the line parsing _first_ splits by `:` and then failed to find a `|` to split on. Check that we get at least two "line parts" (i.e. splits around `|`) when we expect them, and if not, gracefully reject the line instead of crashing. Fixes #572. Signed-off-by: Matthias Rampke <[email protected]>
d6a7196
to
0c2c1d9
Compare
Use go-error-style colons to add more details. Un-capitalize. Signed-off-by: Matthias Rampke <[email protected]>
I'd be happy to, but I don't know how to build an image from this project, had a quick look at the Dockerfile but it expects some already existing binary. Alternatively if there's an easy way for you to make a beta release image available on the Docker Hub, then it will be easy for me to test it on one of our non-production clusters. |
Signed-off-by: Matthias Rampke <[email protected]>
Here you go: |
Thanks a ton!
|
Thanks again for the fix! Will there be a new release and new Docker images soon? |
Yes! I was on vacation, sorry :) |
v0.27.2 is out! |
The line
caused a panic because the line parsing first splits by
:
and then failed tofind a
|
to split on.Check that we get at least two "line parts" (i.e. splits around
|
) when weexpect them, and if not, gracefully reject the line instead of crashing.
Fixes #572.
Signed-off-by: Matthias Rampke [email protected]