Skip to content

fix(syslog): remove abort operator from infallible split() in 'payloadKey' VRL#3344

Open
vparfonov wants to merge 1 commit into
openshift:masterfrom
vparfonov:log9663
Open

fix(syslog): remove abort operator from infallible split() in 'payloadKey' VRL#3344
vparfonov wants to merge 1 commit into
openshift:masterfrom
vparfonov:log9663

Conversation

@vparfonov

@vparfonov vparfonov commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

Description

This PR remove abort operator from infallible split() in payloadKey VRL. The split() function is infallible when both arguments are statically known strings, othervise triggers VRL warning E620. Remove the unnecessary ! to eliminate the warning.
Also add VRL compilation warning assertions to syslog and OTLP functional tests to catch future regressions.

/cc @Clee2691
/assign @jcantrill

Links

Summary by CodeRabbit

  • Bug Fixes

    • Improved parsing of dot-delimited payload keys in syslog output processing.
    • Ensured nested payload fields are extracted reliably without generating VRL compilation warnings.
    • Preserved payload mapping behavior across configured, TLS, and UDP syslog outputs.
  • Tests

    • Added validation confirming OTLP journal and syslog processing completes without VRL compilation warnings.

…Key VRL

The split() function is infallible when both arguments are statically
known strings. In the syslog payloadKey VRL, payload_key is assigned
from a string literal, so split!(payload_key, ".") triggers VRL
warning E620. Remove the unnecessary ! to eliminate the warning.

Also add VRL compilation warning assertions to syslog and OTLP
functional tests to catch future regressions.

Fixes: LOG-9663

Signed-off-by: Vitalii Parfonov <vparfono@redhat.com>
@coderabbitai

coderabbitai Bot commented Jul 13, 2026

Copy link
Copy Markdown

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: b99e8890-b8bc-458c-90b6-2b4eeec235c5

📥 Commits

Reviewing files that changed from the base of the PR and between 678d2ac and 6ca88cc.

📒 Files selected for processing (5)
  • internal/generator/vector/output/syslog/syslog.go
  • internal/generator/vector/output/syslog/tls_with_field_references.toml
  • internal/generator/vector/output/syslog/udp_with_every_setting.toml
  • test/functional/outputs/otlp/journal_test.go
  • test/functional/outputs/syslog/rfc5424_test.go

📝 Walkthrough

Walkthrough

Changes

The change replaces split! with split when deriving VRL payload paths and adds functional assertions that collector logs contain no VRL compilation warnings.

Payload path parsing and validation

Layer / File(s) Summary
Use non-bang payload path splitting
internal/generator/vector/output/syslog/syslog.go, internal/generator/vector/output/syslog/*.toml
Syslog VRL templates now derive dotted paths with split(payload_key, ".") before get(., path).
Reject VRL compilation warnings
test/functional/outputs/otlp/journal_test.go, test/functional/outputs/syslog/rfc5424_test.go
Functional tests read collector logs and assert that VRL compilation warning is absent.

Estimated code review effort: 1 (Trivial) | ~5 minutes

Possibly related PRs

Suggested labels: approved, lgtm, release/6.6

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly states the main change: removing the abort operator from the infallible split() in the syslog payloadKey VRL.
Description check ✅ Passed The description includes the rationale, reviewer/approver commands, and a related JIRA link, matching the template well enough.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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

@openshift-ci openshift-ci Bot requested review from Clee2691 and cahartma July 13, 2026 10:26
@openshift-ci

openshift-ci Bot commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: vparfonov
Once this PR has been reviewed and has the lgtm label, please assign alanconway for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found 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

@Clee2691

Copy link
Copy Markdown
Contributor

/retest

@Clee2691

Copy link
Copy Markdown
Contributor

/lgtm

@openshift-ci openshift-ci Bot added the lgtm Indicates that a PR is ready to be merged. label Jul 13, 2026
@Clee2691

Copy link
Copy Markdown
Contributor

/hold

@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 Jul 13, 2026
@openshift-ci

openshift-ci Bot commented Jul 13, 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/e2e-using-bundle 6ca88cc link false /test e2e-using-bundle

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

do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. lgtm Indicates that a PR is ready to be merged. release/6.6

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants