test(multilineexception): add functional test for incorrectly concatenates independent JSON log records. - #3449
Conversation
Add test verifying that independent log records are NOT merged when the first line contains an exception keyword. JIRA LOG-9963 Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com> Signed-off-by: Vitalii Parfonov <vparfono@redhat.com>
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository: openshift/coderabbit/.coderabbit.yaml Review profile: CHILL Plan: Enterprise Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Comment |
|
/hold until ViaQ/vector#305 |
| appNamespace = framework.Pod.Namespace | ||
| Expect(framework.WriteMessagesToNamespace(strings.Join(buffer, "\n"), appNamespace, 1)).To(Succeed()) | ||
|
|
||
| for _, output := range framework.Forwarder.Spec.Outputs { |
There was a problem hiding this comment.
Don't need to spin through all the outputs if we know there is only one
|
|
||
| for _, output := range framework.Forwarder.Spec.Outputs { | ||
| outputType := output.Type | ||
| raw, err := framework.ReadRawApplicationLogsFrom(string(outputType)) |
There was a problem hiding this comment.
We don't use this often enough but the raw log read and parsing are captured in "ReadApplicationLogsFrom" and can replace those here
|
/test functional-target |
|
/approve |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: jcantrill, vparfonov The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
this fail depends on ViaQ/vector#305 |
|
/test functional-target |
|
@vparfonov: The following test failed, say
Full PR test history. Your PR dashboard. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here. |
Description
Add test verifying that independent log records are NOT merged when the first line contains an exception keyword.
This reproduces the production scenario where a container emits single-line JSON logs, one log has a exception-related term (e.g. SecretConfigException) in its message field, and subsequent normal logs are greedily consumed by the catch-all continuation rule.
The test sends 3 independent messages:
"SecretConfigException: ..."- triggers exception detection"Request completed in 235ms"- regular log"Processing batch 42 records"- regular logExpected: 3 separate log events in the output
Buggy behavior: all 3 merged into 1 event
/cc @Clee2691
/assign @jcantrill
Links