Skip to content

tests: CI test stabilization#11625

Open
mabrarov wants to merge 2 commits intofluent:masterfrom
mabrarov:feature/macos_ci
Open

tests: CI test stabilization#11625
mabrarov wants to merge 2 commits intofluent:masterfrom
mabrarov:feature/macos_ci

Conversation

@mabrarov
Copy link
Copy Markdown
Contributor

@mabrarov mabrarov commented Mar 27, 2026

Changes

  1. tests: runtime: out_counter: decreased flush period for stable behavior.
  2. tests: internal: input_chunk: increased storage size limit for stable behavior.

The tests on macOS where failing on CI like https://github.com/fluent/fluent-bit/actions/runs/23661924165/job/68936596330 (with debug logging turned on):

[661](https://github.com/fluent/fluent-bit/actions/runs/23661924165/job/68936596330#step:5:4662)
Test input_chunk_grouped_release_space_drop_counters... [2026/03/27 19:12:05.271] [ info] [fluent bit] version=5.0.0, commit=3f96bcb700, pid=65363
[2026/03/27 19:12:05.273] [debug] [engine] coroutine stack size: 36864 bytes (36.0K)
[2026/03/27 19:12:05.273] [ info] [storage] created root path /var/folders/tb/y368xp_x10s3ty1b_mtl5mxr0000gn/T//input-chunk-grouped-release-space/
[2026/03/27 19:12:05.274] [ info] [storage] ver=1.5.4, type=memory+filesystem, sync=normal, checksum=off, max_chunks_up=128
[2026/03/27 19:12:05.274] [ info] [storage] backlog input plugin: storage_backlog.1
[2026/03/27 19:12:05.274] [ info] [simd    ] NEON
[2026/03/27 19:12:05.274] [ info] [cmetrics] version=2.0.5
[2026/03/27 19:12:05.274] [ info] [ctraces ] version=0.7.0
[2026/03/27 19:12:05.274] [ info] [input:lib:lib.0] initializing
[2026/03/27 19:12:05.274] [ info] [input:lib:lib.0] storage_strategy='filesystem' (memory + filesystem)
[2026/03/27 19:12:05.274] [debug] [lib:lib.0] created event channels: read=21 write=22
[2026/03/27 19:12:05.275] [ info] [input:storage_backlog:storage_backlog.1] initializing
[2026/03/27 19:12:05.275] [ info] [input:storage_backlog:storage_backlog.1] storage_strategy='memory' (memory only)
[2026/03/27 19:12:05.275] [debug] [storage_backlog:storage_backlog.1] created event channels: read=25 write=26
[2026/03/27 19:12:05.275] [ info] [input:storage_backlog:storage_backlog.1] queue memory limit: 95.4M
[2026/03/27 19:12:05.275] [debug] [http:http.0] created event channels: read=27 write=28
[2026/03/27 19:12:05.275] [debug] [router] match rule lib.0:http.0
[2026/03/27 19:12:05.275] [ info] [output:http:http.0] worker #0 started
[2026/03/27 19:12:05.275] [ info] [output:http:http.0] worker #1 started
[2026/03/27 19:12:05.275] [ info] [sp] stream processor started
[2026/03/27 19:12:05.275] [ info] [engine] Shutdown Grace Period=1, Shutdown Input Grace Period=0
[2026/03/27 19:12:05.539] [debug] [task] created task=0x124e37220 id=0 OK
[2026/03/27 19:12:05.539] [debug] [output:http:http.0] task_id=0 assigned to thread #0
Error: 3/27 19:12:05.540] [error] [input chunk] fail to drop enough chunks in order to place new data coming from input plugin lib.0
Error: 3/27 19:12:05.540] [error] [input chunk] no available chunk
...
[2026/03/27 19:12:09.510] [ info] [input] pausing storage_backlog.1
[2026/03/27 19:12:09.510] [ info] [output:http:http.0] thread worker #0 stopping...
[2026/03/27 19:12:09.510] [ info] [output:http:http.0] thread worker #0 stopped
[2026/03/27 19:12:09.511] [ info] [output:http:http.0] thread worker #1 stopping...
[2026/03/27 19:12:09.511] [ info] [output:http:http.0] thread worker #1 stopped
[ FAILED ]
  input_chunk.c:892: Check ret == 0... failed

Testing

  • [N/A] Example configuration file for the change.
  • [N/A] Debug log output from testing the change.
  • Attached Valgrind output that shows no leaks or memory corruption was found - refer to flb_run_code_analysis.log for the output of command
    TEST_PRESET=valgrind SKIP_TESTS='flb-rt-out_td flb-it-network' ./run_code_analysis.sh
  • [N/A] Run local packaging test showing all targets (including any new ones) build.
  • [N/A] Set ok-package-test label to test for all targets (requires maintainer to do).

Documentation

  • [N/A] Documentation required for this feature

Backporting

  • [N/A] 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

  • Tests
    • Increased test storage threshold to exercise release-space-based dropping and related counters.
    • Shortened test flush interval to speed up counter and log capture paths.

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Mar 27, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 448a721f-854c-41d8-8752-4473c1ca547f

📥 Commits

Reviewing files that changed from the base of the PR and between 8d62489 and c5ccdfd.

📒 Files selected for processing (1)
  • tests/internal/input_chunk.c
✅ Files skipped from review due to trivial changes (1)
  • tests/internal/input_chunk.c

📝 Walkthrough

Walkthrough

Two test files updated: tests/internal/input_chunk.cstorage.total_limit_size changed from "1K" to "1M"; tests/runtime/out_counter.c — service Flush interval changed from "1" to "0.2" in the test helper.

Changes

Cohort / File(s) Summary
Input Chunk Tests
tests/internal/input_chunk.c
Adjusted flb_output_set(..., "storage.total_limit_size", ...) value from "1K" to "1M", affecting the storage threshold used in the test for release-space-based dropping and counters.
Output Counter Tests
tests/runtime/out_counter.c
Changed test helper run_counter_and_capture service config: Flush interval updated from "1" to "0.2" (other service params unchanged).

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Suggested reviewers

  • edsiper
  • cosmo0920

Poem

🐰 A little hop, a tiny tweak,
A megabyte where kilobytes speak,
Flush beats quicker, tests run light,
Counters hum through day and night,
Hooray for changes — swift and sleek! ✨

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'tests: CI test stabilization' is directly related to the PR's main objective of stabilizing CI tests on macOS, which is clearly conveyed in the PR description.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

@mabrarov mabrarov changed the title tests: CI macOS fix tests: CI test stabilization, bin: fix memory leak Mar 27, 2026
Signed-off-by: Marat Abrarov <abrarov@gmail.com>
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 8d62489657

ℹ️ 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".

Copy link
Copy Markdown

@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: 1

🧹 Nitpick comments (1)
tests/internal/input_chunk.c (1)

848-848: Line 848: keep this drop-counter test from becoming vacuous

With storage.total_limit_size = 1M, this test may pass with zero drops while still satisfying current assertions (<= append_count and equality). If the intent is to validate drop counters under pressure, add a positive-drop assertion or lower the limit enough to trigger drops deterministically.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@tests/internal/input_chunk.c` at line 848, The test sets
"storage.total_limit_size" to "1M" which can allow zero drops and make the
drop-counter assertions vacuous; update the test in tests/internal/input_chunk.c
to either lower "storage.total_limit_size" (e.g., to a value that will
deterministically cause drops given the current append pattern) or add an
explicit positive-drop assertion (e.g., require drops > 0) alongside the
existing <= append_count/equality checks so the test actually verifies drop
behavior; locate the assertions referencing append_count and the drop counter in
the same test and adjust the limit or add the positive assertion accordingly.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@tests/internal/input_chunk.c`:
- Line 304: The test's configured output limit "storage.total_limit_size" is set
to "1M" but the test asserts total_bytes <= 1000 elsewhere, causing a mismatch;
update the test configuration for "storage.total_limit_size" in
tests/internal/input_chunk.c (the string literal "storage.total_limit_size") to
a value that matches the assertion (e.g., "1000" or "1k") so the drop-pressure
condition and the total_bytes <= 1000 expectation remain consistent.

---

Nitpick comments:
In `@tests/internal/input_chunk.c`:
- Line 848: The test sets "storage.total_limit_size" to "1M" which can allow
zero drops and make the drop-counter assertions vacuous; update the test in
tests/internal/input_chunk.c to either lower "storage.total_limit_size" (e.g.,
to a value that will deterministically cause drops given the current append
pattern) or add an explicit positive-drop assertion (e.g., require drops > 0)
alongside the existing <= append_count/equality checks so the test actually
verifies drop behavior; locate the assertions referencing append_count and the
drop counter in the same test and adjust the limit or add the positive assertion
accordingly.
🪄 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

Run ID: 4c273f32-527d-48cc-abfe-7c60f340553a

📥 Commits

Reviewing files that changed from the base of the PR and between 32a3cbb and 8d62489.

📒 Files selected for processing (2)
  • tests/internal/input_chunk.c
  • tests/runtime/out_counter.c

"Port", "1",
"retry_limit", "no_retries",
"storage.total_limit_size", "1K",
"storage.total_limit_size", "1M",
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Maybe we can remove this line at all:

Suggested change
"storage.total_limit_size", "1M",

because the test is not about limit, but is about drop of not delivered chunks.

… behavior

Signed-off-by: Marat Abrarov <abrarov@gmail.com>
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