build: add options for plugins at group granularity - #12160
Conversation
Add `FLB_ALL_INPUTS`, `FLB_ALL_PROCESSORS`, `FLB_ALL_FILTERS`, and `FLB_ALL_OUTPUTS` options to control the build for each plugins group individually. Three options for each variable: - `Inherit`: Default, doesn't do anything. - `On`: Plugins for the entire group enabled. - `Off`: Plugins for the entire group disabled. Respects precedence from least to most specific (right overrides left): FLB_MINIMAL => FLB_ALL_* => Individual Option e.g to disable everything except outputs and HTTP input: -DFLB_MINIMAL=On -DFLB_ALL_OUTPUTS=On -DFLB_IN_HTTP=On Signed-off-by: Ra'Jiska <dodo.lasticot@gmail.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughChangesThe CMake plugin options module adds validated Plugin group overrides
Estimated code review effort: 3 (Moderate) | ~20 minutes Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ 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.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@cmake/plugins_options.cmake`:
- Around line 6-9: Update the plugin option setup around FLB_GROUP_OVERRIDE and
option() so inherited options are refreshed from the current group setting when
FLB_ALL_* changes during reconfiguration, while explicitly selected plugin
overrides remain unchanged. Ensure the cache-backed option is force-updated only
for inherited values, preserving the existing option_name, description, and
override behavior.
- Around line 16-23: The FLB_ALL_INPUTS, FLB_ALL_PROCESSORS, FLB_ALL_FILTERS,
and FLB_ALL_OUTPUTS cache variables currently accept arbitrary command-line
values. Validate each value immediately after its cache definition against
exactly On, Off, or Inherit, and call message(FATAL_ERROR ...) for any invalid
value before DEFINE_OPTION(...) or option() processing occurs.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: 366f0c78-ba9c-437d-88e0-d40f1720fa1c
📒 Files selected for processing (1)
cmake/plugins_options.cmake
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 52a64a143c
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| set(FLB_ALL_INPUTS "Inherit" CACHE STRING "Enable/Disable all Input plugins (On, Off, Inherit)") | ||
| set(FLB_ALL_PROCESSORS "Inherit" CACHE STRING "Enable/Disable all Processor plugins (On, Off, Inherit)") | ||
| set(FLB_ALL_FILTERS "Inherit" CACHE STRING "Enable/Disable all Filter plugins (On, Off, Inherit)") | ||
| set(FLB_ALL_OUTPUTS "Inherit" CACHE STRING "Enable/Disable all Output plugins (On, Off, Inherit)") |
There was a problem hiding this comment.
Apply group settings after Windows defaults
On Windows with the default FLB_WINDOWS_DEFAULTS=On, these new controls do not govern most inputs, outputs, or filters: CMakeLists.txt:441-444 includes cmake/windows-setup.cmake later, whose lines 51-143 unconditionally reset many individual plugin variables. Consequently, for example, a fresh -DFLB_ALL_INPUTS=Off configuration still enables the default Windows inputs, while On still leaves several inputs disabled. Apply the group override after the platform defaults or make those defaults respect the selected group value.
AGENTS.md reference: AGENTS.md:L11-L15
Useful? React with 👍 / 👎.
|
thanks for the contribution, please resolve the issues reported by the AI review |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@cmake/plugins_options.cmake`:
- Around line 17-30: Update the option inheritance logic in DEFINE_OPTION so an
unpinned option is marked pinned whenever its current value differs from
_FLB_INHERITED_${option_name}, before updating that inherited-value cache entry.
Preserve existing behavior for matching values and ensure later group changes do
not overwrite a diverged individual BOOL override.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: 399d1db9-6f6b-4241-99fe-5d4b36e356de
📒 Files selected for processing (1)
cmake/plugins_options.cmake
Signed-off-by: Ra'Jiska <dodo.lasticot@gmail.com>
577ae55 to
65f5cd5
Compare
|
Thank you @edsiper , fixed the issues. I left the |
Add
FLB_ALL_INPUTS,FLB_ALL_PROCESSORS,FLB_ALL_FILTERS, andFLB_ALL_OUTPUTSoptions to control the build for each plugins group individually.Three options for each variable:
Inherit: Default, doesn't do anything.On: Plugins for the entire group enabled.Off: Plugins for the entire group disabled.Respects precedence from least to most specific (right overrides left):
e.g to disable everything except outputs and HTTP input:
The above configuration results in:
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
fluent/fluent-bit-docs#2632
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
New Features
On,Off, orInheritsettings, allowing broad defaults while preserving individual plugin choices.