config: error configure_plugins_type on invalid properties - #10296
Merged
Conversation
stoksc
requested review from
edsiper,
fujimotos,
koleini and
leonardo-albertovich
as code owners
May 6, 2025 19:34
stoksc
force-pushed
the
stoksc/invalid-input-property
branch
from
May 6, 2025 19:46
82e5741 to
ea1ea67
Compare
stoksc
force-pushed
the
stoksc/invalid-input-property
branch
from
May 6, 2025 21:20
511c426 to
e85d7f7
Compare
stoksc
force-pushed
the
stoksc/invalid-input-property
branch
2 times, most recently
from
May 9, 2025 21:10
e85d7f7 to
ffffa03
Compare
stoksc
force-pushed
the
stoksc/invalid-input-property
branch
2 times, most recently
from
May 12, 2025 16:03
677fc73 to
df46f10
Compare
Contributor
Author
|
Thanks for the review, @leonardo-albertovich. I've updated the pr with the changes you requested. |
leonardo-albertovich
suggested changes
May 14, 2025
Contributor
Author
|
thanks @leonardo-albertovich, again. I've pushed a fix. |
leonardo-albertovich
approved these changes
May 14, 2025
Contributor
Author
|
i'll try to follow https://github.com/fluent/fluent-bit-docs/blob/master/CONTRIBUTING.md, i'll post back when i've updated the commits. |
stoksc
force-pushed
the
stoksc/invalid-input-property
branch
from
May 14, 2025 15:48
77ef771 to
7130d74
Compare
Contributor
Author
|
ok, @leonardo-albertovich I think my commits should conform to the contributing guide. what happens next? do you merge it if it passes? |
Contributor
|
Nope, it passes, I approve it, tag it if possible and ping @edsiper so he merges it when he considers it appropriate. |
7 tasks
stoksc
commented
May 19, 2025
stoksc
force-pushed
the
stoksc/invalid-input-property
branch
from
May 19, 2025 20:32
f1a0272 to
48f4886
Compare
Member
After this change, when a plugin configuration contains an invalid property, `configure_plugins_type` returns an error which ultimately crashes fluentbit, instead of only printing an error log and continuing on. The change also fixes a small issue where `name` was printed by `flb_error` after it was freed. To properly test this change and get the test to pass with `-DSANITIZE_ADDRESS=On` on all platforms, I had to update `configure_plugins_type` to free objects that it fails to instantiate. Signed-off-by: Bradley Laney <bradley.laney@chronosphere.io>
…invalid properties Signed-off-by: Bradley Laney <bradley.laney@chronosphere.io>
Member
|
thank you |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

After this change, when a plugin configuration contains an invalid property,
configure_plugins_typereturns an error which ultimately crashes fluentbit, instead of only printing an error log and continuing on. The change also fixes a small issue wherenamewas printed byflb_errorafter it was freed. To properly test this change and get the test to pass with-DSANITIZE_ADDRESS=Onon all platforms, I had to updateconfigure_plugins_typeto free objects that it fails to instantiate.Enter
[N/A]in the box, if an item is not applicable to your change.Testing
Before we can approve your change; please submit the following in a comment:
Added tests, so the configuration files and outputs can be found there.
If this is a change to packaging of containers or native binaries then please confirm it works for all targets.
ok-package-testlabel to test for all targets (requires maintainer to do).Documentation
Backporting
Fluent Bit is licensed under Apache 2.0, by submitting this pull request I understand that this code will be released under the terms of that license.