config_format: fix variant array not resizable in YAML parser#11971
config_format: fix variant array not resizable in YAML parser#11971yadoer wants to merge 1 commit into
Conversation
The variant array in state_push_variant() was created with a fixed size of 10 but not marked as resizable. This causes "unable to add key to list map" errors when parsing YAML configs with more than 10 entries in a list (e.g., rewrite_tag rules or OTel routes). Add cfl_array_resizable(array, CFL_TRUE) to match the same pattern already used in state_push_witharr() in the same file. Signed-off-by: Yadong Zhang <yadz@microsoft.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughIn ChangesYAML variant array resizability fix
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 minutes Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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 |
There was a problem hiding this comment.
Could you fix this DCO failure?
Commit sha: 7c0565d, Author: Yadong Zhang, Committer: Yadong Zhang; Expected "Yadong Zhang yadoer@users.noreply.github.com", but got "Yadong Zhang yadz@<>".
ref: https://github.com/fluent/fluent-bit/pull/11971/checks?check_run_id=82558985046
Plus, we encourage to add unit tests as much as possible.
So, in this case, we have to confirm over 10 items of array elements on processing YAML configuration like this unit tests here:
https://github.com/fluent/fluent-bit/blob/master/tests/internal/config_format_yaml.c
The variant array in state_push_variant() was created with a fixed size of 10 but not marked as resizable. This causes "unable to add key to list map" errors when parsing YAML configs with more than 10 entries in a list (e.g., rewrite_tag rules or OTel routes).
Add cfl_array_resizable(array, CFL_TRUE) to match the same pattern already used in state_push_witharr() in the same file.
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:
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.
Summary by CodeRabbit