Repository navigation
tests: runtime: out_http: push JSON format records together - #12600
Conversation
The JSON format cases pushed their two records separately. When a flush ran between the pushes, the records went to separate chunks, so each formatter call held a single record and the check for both records failed. Push both records at once, so they are appended to the same chunk. Signed-off-by: Eduardo Silva <eduardo@chronosphere.io>
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
📝 Walkthrough
Merge Risk: ⚪ Minimal · up to
|
Problem
flb-rt-out_httpfails intermittently in the unit test workflow, onmasterand on pull requests, always in the same place:
The JSON format cases push their two records with two
flb_lib_push()calls.in_libappends each read on its own, so when a flush runs between thepushes the records land in separate chunks. The formatter then runs once per
record, and neither call contains both records, which is what the check
expects. Under parallel ctest load this happens often enough to fail CI.
format_jsonandformat_json_lineshave the same race.Change
Push both records in a single
flb_lib_push()in the three JSON formatcases. They are appended to the same chunk and formatted together. The
expected output and the checks are unchanged.
#12582 changes the same test to accept records spread across formatter calls.
This change keeps the check that both records are formatted together, and
also covers
format_jsonandformat_json_lines.Testing
flb-rt-out_http: all 15 cases pass (FLB_TEST_HTTP_PORTset locallybecause port 8888 is in use on the test machine).
Summary by CodeRabbit