Skip to content

Conversation

ThomasDevoogdt
Copy link
Contributor

@ThomasDevoogdt ThomasDevoogdt commented Aug 31, 2025

ubuntu:22.04:
Setting up librdkafka-dev:amd64 (1.8.0-1build1) ...

ubuntu:24.04:
Setting up librdkafka-dev:amd64 (2.3.0-1build2) ...

So we can only enforce it for ubuntu:24.04.


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 PR compile checks to install an additional system library (librdkafka) during build verification.
    • Expanded dynamic dependency validation to include the new library across supported environments, with explicit checks in dependency reports.
    • Renamed dependency display steps to reflect the broader coverage.
    • Enhances build consistency and transparency in CI.
    • No user-facing behavior changes.

ubuntu:22.04:
  Setting up librdkafka-dev:amd64 (1.8.0-1build1) ...

ubuntu:24.04:
  Setting up librdkafka-dev:amd64 (2.3.0-1build2) ...

So we can only enforce it for ubuntu:24.04.

Signed-off-by: Thomas Devoogdt <[email protected]>
Copy link

coderabbitai bot commented Aug 31, 2025

Walkthrough

The PR updates the PR compile check workflow to install librdkafka-dev and extends ldd-based dependency verification to include librdkafka alongside libmsgpack, adjusting step names and greps accordingly within the Ubuntu 24.04 job.

Changes

Cohort / File(s) Summary
CI workflow updates
\.github/workflows/pr-compile-check.yaml
- Install librdkafka-dev in pr-compile-system-libs
- Rename dependency display step to include librdkafka
- Add ldd/grep checks for librdkafka in ubuntu-24.04 path
- Extend broader ldd results to grep for librdkafka

Sequence Diagram(s)

sequenceDiagram
    actor Dev as Developer
    participant GH as GitHub Actions
    participant R as Runner (ubuntu-24.04)

    Dev->>GH: Open PR
    GH->>R: Start pr-compile-check workflow
    R->>R: Checkout code
    rect rgb(240,248,255)
    note over R: System libraries installation (updated)
    R->>R: apt-get install ... librdkafka-dev
    end
    R->>R: Build project/binaries
    rect rgb(245,255,245)
    note over R: Dependency verification (expanded)
    R->>R: ldd <binary> | grep libmsgpack
    R->>R: ldd <binary> | grep librdkafka
    R->>R: Display ldd results (includes librdkafka)
    end
    R-->>GH: Report job status
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

I nibble through logs with whiskers keen,
Found Kafka’s librdkafka in the build machine.
Msgpack hops beside, dependencies aligned—
Our CI burrow tidy, neatly designed.
Thump-thump! The checks all pass—how serene. 🐇✨

✨ Finishing Touches
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment

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
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

CodeRabbit Commands (Invoked using PR/Issue comments)

Type @coderabbitai help to get the list of available commands.

Other keywords and placeholders

  • Add @coderabbitai ignore or @coderabbit ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Status, Documentation and Community

  • Visit our Status Page to check the current availability of CodeRabbit.
  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

🧹 Nitpick comments (2)
.github/workflows/pr-compile-check.yaml (2)

71-71: Good addition; consider logging exact package versions for traceability

Installing librdkafka-dev here is correct. To aid debugging across Ubuntu 22.04 vs 24.04, print the installed versions of librdkafka-dev and libmsgpack-dev right after apt install.

           sudo apt-get install -y libc-ares-dev libjemalloc-dev libluajit-5.1-dev \
-            libnghttp2-dev libsqlite3-dev libzstd-dev libmsgpack-dev librdkafka-dev
+            libnghttp2-dev libsqlite3-dev libzstd-dev libmsgpack-dev librdkafka-dev
+          echo "Installed versions:"
+          dpkg -l | awk '/libmsgpack-dev|librdkafka-dev/ {print $1, $2, $3}'
+          apt-cache policy librdkafka-dev | sed -n 's/  Installed: /librdkafka-dev Installed: /p'
+          apt-cache policy libmsgpack-dev | sed -n 's/  Installed: /libmsgpack-dev Installed: /p'

115-122: Tighten ldd checks to match actual sonames and fail fast

On Debian/Ubuntu the runtime sonames are libmsgpackc.so.X and librdkafka.so.X. Grepping “libmsgpack” can produce false positives. Also add strict shell options.

-      - name: Display dependencies w/ ldd for libmsgpack and librdkafka
+      - name: Display dependencies w/ ldd for libmsgpack and librdkafka
         if: matrix.os.version == 'ubuntu-24.04'
         run: |
-          export ldd_result=$(ldd ./bin/fluent-bit)
-          echo "ldd result:"
-          echo "$ldd_result" | grep libmsgpack
-          echo "$ldd_result" | grep librdkafka
+          set -Eeuo pipefail
+          ldd_result="$(ldd ./bin/fluent-bit)"
+          echo "$ldd_result"
+          echo "$ldd_result" | grep -E 'libmsgpackc\.so(\.[0-9]+)?'
+          echo "$ldd_result" | grep -E 'librdkafka\.so(\.[0-9]+)?'
         working-directory: build
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

💡 Knowledge Base configuration:

  • MCP integration is disabled by default for public repositories
  • Jira integration is disabled by default for public repositories
  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between 1132279 and b1e9b72.

📒 Files selected for processing (1)
  • .github/workflows/pr-compile-check.yaml (2 hunks)

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.

1 participant