feat(syslog): fix syslog severity short-form aliases not recognized by encoder#279
feat(syslog): fix syslog severity short-form aliases not recognized by encoder#279vparfonov wants to merge 1 commit into
Conversation
…y encoder
The Severity enum only accepted full-form names (e.g. "critical",
"emergency", "informational") but VRL functions to_syslog_severity and
to_syslog_level use short-form names ("crit", "emerg", "info"). This
caused user-configured severity values like "crit" to silently fall back
to "informational" (severity 6).
Add strum serialize aliases so the encoder accepts both short-form and
full-form severity names: emerg/emergency, crit/critical, err/error,
warn/warning, info/informational, and the deprecated "panic" alias.
Co-Authored-By: Claude Opus 4.6 (1M context) <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: Organization UI 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)
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 |
|
upstream PR: vectordotdev#25731 |
|
/hold |
|
/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 |
|
/override ci/prow/cluster-logging-operator-e2e |
|
@jcantrill: Overrode contexts on behalf of jcantrill: ci/prow/cluster-logging-operator-e2e DetailsIn response to this:
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. |
|
/lgtm |
|
/retest-required |
|
/hold cancel |
|
/test clo-functional |
|
@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. |
The syslog codec's Severity enum only accepts full-form keywords ("critical", "emergency", "informational", etc.) but the VRL functions to_syslog_severity and to_syslog_level use short-form keywords ("crit", "emerg", "info", etc.). When a short-form value reaches the syslog encoder, FromStr parsing fails silently and the severity falls back to the default Informational (6).
This adds strum serialize aliases so the encoder accepts both forms:
ref: https://redhat.atlassian.net/browse/LOG-9563
depends on: openshift/cluster-logging-operator#3330