fix(syslog): quote payloadKey path to prevent VRL evaluation as expression#3327
fix(syslog): quote payloadKey path to prevent VRL evaluation as expression#3327vparfonov wants to merge 3 commits into
Conversation
…ssion The payloadKey was injected unquoted into VRL, causing it to be evaluated as a field access expression rather than kept as a path string. This meant the resolved value was then re-interpreted as a path via split+get, which always failed, producing repeated "payload_key not found" warnings. Fixes: LOG-9562 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> Signed-off-by: Vitalii Parfonov <vparfono@redhat.com>
|
Skipping CI for Draft Pull Request. |
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Path: .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:
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: vparfonov The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
/test functional-target |
|
/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. |
|
/test functional-target |
Description
Root Cause:
The payloadKey path (e.g., .message) was injected unquoted into the VRL template:
payload_key = .message # evaluates as VRL expression, reads the VALUE of .messageThis resolved
.messageto its runtime value (e.g., "Hello World"), which was then treated as a field path looking for a field literally named "Hello World", which doesn't exist.For payloadKey:
"{.message}"this only produced noisy warnings (since.messagewas left unchanged). For any other field (e.g.,{.kubernetes.namespace_name}), it silently failed to set.messageto the intended value.Fix:
Quote the path as a string literal and strip the leading dot before splitting:
/cc @Clee2691
/assign @jcantrill
Links