Skip to content

Conversation

pwhelan
Copy link
Contributor

@pwhelan pwhelan commented Oct 14, 2025

Description

This is a backport of #11020 to 4.0.

Problem

The output plugins are not appearing in the JSON output from when generating fluent-bit schema via ./bin/calyptia-fluent-bit -J.

Root Cause

In flb/src/flb_help.c:717, the root msgpack map was initialized with size 5:
msgpack_pack_map(&mp_pck, 5);

However, the code was actually adding 6 entries to the root map:

  • fluent-bit
  • customs
  • inputs
  • processors (this was missing from the comment)
  • filters
  • outputs

Because the map was declared with size 5, when msgpack tried to pack 6 entries, the 6th entry ("outputs") was being written to the buffer but wasn't properly included in the map structure, causing it to be silently dropped during JSON conversion.

Fix

Changed line 717 from msgpack_pack_map(&mp_pck, 5) to msgpack_pack_map(&mp_pck, 6) and updated the comment to reflect all 6 entries including "processors".
Verification
All 46 output plugins now appear in the JSON output
The JSON structure includes all 6 root keys: customs, filters, fluent-bit, inputs, outputs, and processors
No debug output is printed to stderr


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:

  • [N/A] Example configuration file for the change
  • [N/A] Debug log output from testing the change
  • [N/A] Attached Valgrind output that shows no leaks or memory corruption was found

Documentation

  • [N/A] Documentation required for this feature

Backporting

  • Backport to latest stable release.

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.

Copy link

coderabbitai bot commented Oct 14, 2025

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch pwhelan-fix-schema-outputs-4.0

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@cosmo0920 cosmo0920 merged commit 98446bd into 4.0 Oct 20, 2025
54 of 55 checks passed
@cosmo0920 cosmo0920 deleted the pwhelan-fix-schema-outputs-4.0 branch October 20, 2025 03:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants