Skip to content

test(multilineexception): add functional test for incorrectly concatenates independent JSON log records. - #3449

Open
vparfonov wants to merge 1 commit into
openshift:release-6.2from
vparfonov:log9963-release-6.2
Open

test(multilineexception): add functional test for incorrectly concatenates independent JSON log records.#3449
vparfonov wants to merge 1 commit into
openshift:release-6.2from
vparfonov:log9963-release-6.2

Conversation

@vparfonov

@vparfonov vparfonov commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

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:

  1. "SecretConfigException: ..." - triggers exception detection
  2. "Request completed in 235ms" - regular log
  3. "Processing batch 42 records" - regular log

Expected: 3 separate log events in the output
Buggy behavior: all 3 merged into 1 event

/cc @Clee2691
/assign @jcantrill

Links

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>
@coderabbitai

coderabbitai Bot commented Sep 1, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository: openshift/coderabbit/.coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: dcc2527b-696f-46f8-bdd9-9b5af0c56703

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Comment @coderabbitai help to get the list of available commands.

@vparfonov

Copy link
Copy Markdown
Contributor Author

/hold until ViaQ/vector#305

@openshift-ci openshift-ci Bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Sep 1, 2026
@vparfonov vparfonov changed the title test(multilineexception): add functional test for LOG-9963 test(multilineexception): add functional test for incorrectly concatenates independent JSON log records. Sep 2, 2026
appNamespace = framework.Pod.Namespace
Expect(framework.WriteMessagesToNamespace(strings.Join(buffer, "\n"), appNamespace, 1)).To(Succeed())

for _, output := range framework.Forwarder.Spec.Outputs {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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))

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

We don't use this often enough but the raw log read and parsing are captured in "ReadApplicationLogsFrom" and can replace those here

@jcantrill

Copy link
Copy Markdown
Contributor

/test functional-target

@jcantrill

Copy link
Copy Markdown
Contributor

/approve

@openshift-ci

openshift-ci Bot commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

[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

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci openshift-ci Bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Sep 2, 2026
@vparfonov

Copy link
Copy Markdown
Contributor Author

/test functional-target

this fail depends on ViaQ/vector#305

@vparfonov

Copy link
Copy Markdown
Contributor Author

/test functional-target

@openshift-ci

openshift-ci Bot commented Sep 10, 2026

Copy link
Copy Markdown
Contributor

@vparfonov: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/functional-target b88ed0f link true /test functional-target

Full PR test history. Your PR dashboard.

Details

Instructions 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. release/6.2

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants