Skip to content

config: config_format: address wrongly specified parameter on service section - #12314

Open
cosmo0920 wants to merge 3 commits into
masterfrom
cosmo0920-address-wrongly-specified-parameter-on-service-section
Open

config: config_format: address wrongly specified parameter on service section#12314
cosmo0920 wants to merge 3 commits into
masterfrom
cosmo0920-address-wrongly-specified-parameter-on-service-section

Conversation

@cosmo0920

@cosmo0920 cosmo0920 commented Aug 20, 2026

Copy link
Copy Markdown
Contributor
  • Unknown [SERVICE] properties now warn while preserving success behavior.
  • Unknown configuration sections now warn and are ignored.
  • Section names require exact case-insensitive matches, so [SERVIC] is correctly rejected.
  • Added classic/YAML and compatibility regression tests in config_service.c.

Verification:

  • ctest --test-dir build -R '^flb-it-config_(service|format|format_fluentbit|format_yaml)$' --output-on-failure
    • 4/4 passed.
  • Classic, YAML, and [SERVIC] executable --dry-run checks succeeded with the expected warnings.
  • Memory checker: not run; Valgrind and macOS Leaks are unavailable on Windows.
  • Working tree is clean.

Closes #8819


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:

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

If this is a change to packaging of containers or native binaries then please confirm it works for all targets.

  • Run local packaging test showing all targets (including any new ones) build.
  • Set ok-package-test label to test for all targets (requires maintainer to do).

Documentation

  • 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.

Summary by CodeRabbit

  • Bug Fixes

    • Improved configuration parsing to prevent partial matches for section names.
    • Unknown service properties and configuration sections are now reported with warnings and safely ignored.
    • Added validation for supported service properties across configuration formats.
  • Tests

    • Added coverage for unknown properties, invalid sections, and classic/YAML configuration handling.

@coderabbitai

coderabbitai Bot commented Aug 20, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Team

Run ID: 6d5786b8-4d42-4f5a-87b1-b3e0b3185f91

📥 Commits

Reviewing files that changed from the base of the PR and between a31cf11 and df25a5d.

📒 Files selected for processing (6)
  • include/fluent-bit/flb_config.h
  • src/config_format/flb_config_format.c
  • src/flb_config.c
  • tests/internal/CMakeLists.txt
  • tests/internal/config_service.c
  • tests/internal/data/config_format/yaml/unknown_service.yaml

Included review availability: Your plan provides up to 8 included reviews per hour; 7 remain after this review.


📝 Walkthrough

Walkthrough

Changes

Configuration validation

Layer / File(s) Summary
Exact section-name matching
src/config_format/flb_config_format.c
Section classification now requires exact, case-insensitive matches for supported section names.
Service-property validation and warnings
include/fluent-bit/flb_config.h, src/flb_config.c
Adds a public service-property validation helper. Unknown service properties and unsupported sections now produce warnings while remaining ignored.
Configuration validation tests
tests/internal/config_service.c, tests/internal/CMakeLists.txt, tests/internal/data/config_format/yaml/unknown_service.yaml
Adds internal tests for property validation, compatibility behavior, invalid sections, and classic and YAML configuration loading.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Merge Risk: ⚪ Minimal · up to df25a

Unknown configuration properties and sections are now warned about and ignored, while misspelled section names are rejected more precisely; no actionable merge-blocking risk remains after normal checks and review.

Suggested reviewers: edsiper

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Out of Scope Changes check ⚠️ Warning The PR also changes generic section-name matching and adds warnings for unknown configuration sections. These changes are not required by issue #8819, which only covers invalid parameters in the servi… Remove the generic unknown-section handling and exact section-name matching changes, or link issues that explicitly require those behaviors and explain their scope in the PR.
Docstring Coverage ⚠️ Warning Docstring coverage is 9.09% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 11 functions across 4 files. (2 skipped: 2… Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly identifies the main change: handling incorrectly specified parameters in the service section.
Linked Issues check ✅ Passed The changes satisfy issue #8819 by validating service-property names, warning for unknown properties, preserving compatibility behavior, and adding regression tests.
Full details: Out of Scope Changes check

Explanation

The PR also changes generic section-name matching and adds warnings for unknown configuration sections. These changes are not required by issue #8819, which only covers invalid parameters in the service section.

Full details: Docstring Coverage

Explanation

Docstring coverage is 9.09% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 11 functions across 4 files. (2 skipped: 2 unsupported.)

  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch cosmo0920-address-wrongly-specified-parameter-on-service-section

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.

@cosmo0920
cosmo0920 force-pushed the cosmo0920-address-wrongly-specified-parameter-on-service-section branch from 9376074 to 1b115ce Compare August 20, 2026 11:34
@cosmo0920 cosmo0920 changed the title config: config_format: address wrongly specified parameter on service section config: config_format: address wrongly specified parameter on service section Aug 20, 2026
Signed-off-by: Hiroshi Hatake <hiroshi@chronosphere.io>
Signed-off-by: Hiroshi Hatake <hiroshi@chronosphere.io>
…ction

Signed-off-by: Hiroshi Hatake <hiroshi@chronosphere.io>
@cosmo0920
cosmo0920 force-pushed the cosmo0920-address-wrongly-specified-parameter-on-service-section branch from 1b115ce to df25a5d Compare September 1, 2026 06:07
@cosmo0920
cosmo0920 marked this pull request as ready for review September 1, 2026 06:07
@cosmo0920
cosmo0920 requested a review from edsiper as a code owner September 1, 2026 06:07
@cosmo0920 cosmo0920 added this to the Fluent Bit v5.1.2 milestone Sep 1, 2026
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 1, 2026

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review Completed 2026-09-01T06:10:50.430171Z df25a5d Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

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.

Fluent Bit silently ignores wrong parameter names in the service section

1 participant