tests: runtime: out_http: out_chronicle: fix output runtime test races#12154
tests: runtime: out_http: out_chronicle: fix output runtime test races#12154cosmo0920 wants to merge 3 commits into
Conversation
…ults Signed-off-by: Hiroshi Hatake <hiroshi@chronosphere.io>
Signed-off-by: Hiroshi Hatake <hiroshi@chronosphere.io>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughRuntime Chronicle and HTTP output tests now use mutex-protected invocation counters and deferred callback error reporting. Chronicle tests centralize stopping and validation, while HTTP callbacks validate formatter output and aggregate MessagePack matches safely. ChangesRuntime callback validation
Estimated code review effort: 3 (Moderate) | ~25 minutes Suggested reviewers: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@tests/runtime/out_http.c`:
- Line 258: After the MessagePack unpack loop, validate the final result before
calling add_output_num(matches): fail for MSGPACK_UNPACK_PARSE_ERROR and
MSGPACK_UNPACK_NOMEM_ERROR, allow MSGPACK_UNPACK_CONTINUE only when the input is
empty, and reject every other result. Keep matches unpublished unless this
validation succeeds.
🪄 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 Plus
Run ID: 930a382e-5516-4568-83c0-57d966e4f0eb
📒 Files selected for processing (2)
tests/runtime/out_chronicle.ctests/runtime/out_http.c
Signed-off-by: Hiroshi Hatake <hiroshi@chronosphere.io>
Fixed in:
Current branch commits:
49be100e0—tests: runtime: out_http: Prevent resource races on checking resultse913d782f—tests: runtime: out_chronicle: Prevent resource races on checking resultsVerification:
build/bin/flb-rt-out_http— 15/15 passedTSAN_OPTIONS='halt_on_error=1:exitcode=66' build_tsan/bin/flb-rt-out_http— 15/15 passed, no TSAN warningsbuild/bin/flb-rt-out_chronicle— 8/8 passedTSAN_OPTIONS='halt_on_error=1:exitcode=66' build_tsan/bin/flb-rt-out_chronicle— 8/8 passed, no TSAN warningstests/integration/.venv/bin/python -m pytest tests/integration/scenarios/out_http/tests/test_out_http_001.py -q— 11 passedValgrind verification could not run because Valgrind is not installed on this macOS host (
command -v valgrindreturned no executable).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:
If this is a change to packaging of containers or native binaries then please confirm it works for all targets.
ok-package-testlabel to test for all targets (requires maintainer to do).Documentation
Backporting
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
Summary by CodeRabbit