-
Notifications
You must be signed in to change notification settings - Fork 1.9k
filter_kubernetes: fix parser annotation leak #11333
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
Conversation
📝 WalkthroughWalkthroughAdds defensive cleanup in Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Suggested labels
Suggested reviewers
Poem
Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✨ Finishing touches
📜 Recent review detailsConfiguration used: defaults Review profile: CHILL Plan: Pro ⛔ Files ignored due to path filters (2)
📒 Files selected for processing (3)
✅ Files skipped from review due to trivial changes (1)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (31)
🔇 Additional comments (3)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Detailed bug/fix notes:
|
|
Valgrind report (full filter_kubernetes runtime suite): Command: Result: |
|
Valgrind report without the fix (baseline commit a981f66): To exercise the order-dependent leak, I used the same runtime test but reordered the annotations in the metadata file so fluentbit.io/parser appears before container-specific parsers, and updated the expected output accordingly (local-only in the baseline worktree). Command: Result: |
|
@erain thanks for this contribution! would you please split the commits in 2 ? , e.g:
|
dd2c676 to
e86c8ac
Compare
Free previous parser SDS when annotations override defaults. Signed-off-by: Yu Yi <yiyu@google.com>
Add a filter_kubernetes runtime test fixture where fluentbit.io/parser is listed before container-specific parsers. Signed-off-by: Yu Yi <yiyu@google.com>
e86c8ac to
f9b90cf
Compare
Thanks a lot for the review! I have split the commit into two as mentioned and updated the PR. Also, since this is for fixing a memory leak problem, is it possible to backport this fix to 4.0.x and 4.1.x releases as well? (GKE is still on 4.0.x at the moment) |
|
@cosmo0920 would you please help with backport of this one ? |
|
Yes, let's do that. |
Summary
Testing
valgrind --leak-check=full --show-leak-kinds=definite --errors-for-leak-kinds=definite --error-exitcode=1 build/valgrind/bin/flb-rt-filter_kubernetes --no-execSummary by CodeRabbit
Bug Fixes
Tests
✏️ Tip: You can customize this high-level summary in your review settings.