Skip to content

Conversation

@cosmo0920
Copy link
Contributor

@cosmo0920 cosmo0920 commented Jan 5, 2026


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

  • Chores

    • Updated commit validation tooling to properly handle fluent-bit.c file path mappings.
  • Tests

    • Added test coverage for commit prefix validation when modifying the fluent-bit.c file.

✏️ Tip: You can customize this high-level summary in your review settings.

Signed-off-by: Hiroshi Hatake <hiroshi@chronosphere.io>
Signed-off-by: Hiroshi Hatake <hiroshi@chronosphere.io>
@coderabbitai
Copy link

coderabbitai bot commented Jan 5, 2026

📝 Walkthrough

Walkthrough

The changes add a special-case mapping for src/fluent-bit.c to infer the "bin:" commit prefix, overriding the default directory-based prefix inference. Two new test cases validate this behavior for both prefix inference and commit message validation.

Changes

Cohort / File(s) Summary
Prefix inference mapping
.github/scripts/commit_prefix_check.py
Adds special-case handling to map src/fluent-bit.c to the "bin:" prefix during component prefix inference from file paths.
Test coverage for bin: prefix
.github/scripts/tests/test_commit_lint.py
Adds two test cases: one validating "bin:" prefix inference from src/fluent-bit.c, and another validating commit acceptance with "bin:" prefix and Signed-off-by line.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Possibly related PRs

Suggested reviewers

  • niedbalski
  • patrick-stephens

Poem

🐰✨ A fluent-bit hops into place,
With "bin:" prefix, quick pace,
Tests confirm the mapping's right,
Entry point shines ever bright! 🌟

Pre-merge checks and finishing touches

✅ 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 and specifically describes the main change: handling a bin prefix for fluent-bit.c in the commit linter scripts, which aligns with the actual code modifications.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
✨ Finishing touches
  • 📝 Generate docstrings

📜 Recent review details

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between a981f66 and 1864ee4.

📒 Files selected for processing (2)
  • .github/scripts/commit_prefix_check.py
  • .github/scripts/tests/test_commit_lint.py
🧰 Additional context used
🧬 Code graph analysis (1)
.github/scripts/tests/test_commit_lint.py (1)
.github/scripts/commit_prefix_check.py (2)
  • infer_prefix_from_paths (30-88)
  • validate_commit (126-216)
🔇 Additional comments (3)
.github/scripts/commit_prefix_check.py (1)

65-76: LGTM! Clean special-case handling for the binary entry point.

The implementation correctly maps src/fluent-bit.c to the bin: prefix. The logic order in the elif chain is appropriate—checking flb_ prefixed files first, then the specific entry point file, then falling back to subdirectory-based prefixes. The approach is consistent with existing prefix inference patterns.

.github/scripts/tests/test_commit_lint.py (2)

69-78: LGTM! Comprehensive test coverage for prefix inference.

The test correctly validates that src/fluent-bit.c maps to the bin: prefix and confirms build_optional is True (indicating a component was touched). The test name, documentation, and assertions are all clear and appropriate.


171-184: LGTM! Validates end-to-end commit validation flow.

This test appropriately verifies that commits modifying src/fluent-bit.c with the bin: prefix (and proper Signed-off-by line) pass validation. The test complements the prefix inference test and follows established patterns in the test suite.


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 added this to the Fluent Bit v4.2.3 milestone Jan 5, 2026
@edsiper edsiper merged commit 2e7f2e8 into master Jan 5, 2026
18 checks passed
@edsiper edsiper deleted the cosmo0920-handle-bin-prefix-for-fluent-bit.c branch January 5, 2026 16:11
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