Skip to content

tests: runtime: Try to eliminate flakyness on CI load - #11984

Merged
edsiper merged 1 commit into
masterfrom
cosmo0920-stabilize-out_lib-test-2nd-attempt
Jun 23, 2026
Merged

tests: runtime: Try to eliminate flakyness on CI load#11984
edsiper merged 1 commit into
masterfrom
cosmo0920-stabilize-out_lib-test-2nd-attempt

Conversation

@cosmo0920

@cosmo0920 cosmo0920 commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

To stabilize testing work load of out_lib, we might have to use batch style of ingesting 100 records.


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

  • Tests
    • Optimized test execution for the max_records validation by batching input data into a single aggregated payload instead of multiple individual pushes.

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

coderabbitai Bot commented Jun 23, 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: Pro

Run ID: 0f25ce14-4a66-4b34-b7fe-58b392dd01a8

📥 Commits

Reviewing files that changed from the base of the PR and between 0481348 and cc5039c.

📒 Files selected for processing (1)
  • tests/runtime/out_lib.c

📝 Walkthrough

Walkthrough

In tests/runtime/out_lib.c, the test_max_records test is updated to send 100 records as a single aggregated buffer. Instead of calling flb_lib_push 100 times in a loop, it now allocates one contiguous buffer, fills it with 100 copies of input_json via memcpy, calls flb_lib_push once, and frees the buffer.

Changes

test_max_records single-buffer push

Layer / File(s) Summary
Aggregated buffer variables and push logic
tests/runtime/out_lib.c
Adds input_buffer, input_records (100), and input_size variables; replaces the per-record flb_lib_push loop with a single allocation, memcpy-based population, one flb_lib_push call, and a subsequent free.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Possibly related PRs

  • fluent/fluent-bit#11888: Modifies the same test_max_records() function in tests/runtime/out_lib.c, stabilizing its waiting and timeout logic.

Suggested reviewers

  • edsiper

Poem

🐇 One hop, one push, no need to loop,
A hundred records fit in one scoop!
memcpy fills the buffer with care,
Then flb_lib_push sends them all through the air.
Less calls, same test — the rabbit approves! 🌟

🚥 Pre-merge checks | ✅ 4 | ❌ 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 (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title directly addresses the main change: improving CI stability for the out_lib test by optimizing record ingestion from 100 separate pushes to a single batch operation.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

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

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch cosmo0920-stabilize-out_lib-test-2nd-attempt

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 marked this pull request as ready for review June 23, 2026 08:40
@cosmo0920
cosmo0920 requested a review from edsiper as a code owner June 23, 2026 08:40
@cosmo0920 cosmo0920 added this to the Fluent Bit v5.0.8 milestone Jun 23, 2026
@edsiper
edsiper merged commit d31bc0b into master Jun 23, 2026
65 checks passed
@edsiper
edsiper deleted the cosmo0920-stabilize-out_lib-test-2nd-attempt branch June 23, 2026 21:23
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.

2 participants