LOG-10325: match structured log levels case-insensitively - #3525
kchawlani19 wants to merge 1 commit into
Conversation
Uppercase tokens such as "level":"INFO" missed the structured matcher, so the keyword scan tagged the line from an earlier severity word in the message. Keep klog prefixes case-sensitive. Signed-off-by: kchawlani19 <kchawlan@redhat.com>
|
@kchawlani19: This pull request references LOG-10325 which is a valid jira issue. Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the bug to target the "4.8.0" version, but no target version was set. 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 openshift-eng/jira-lifecycle-plugin repository. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository: openshift/cluster-logging-operator/.coderabbit.yaml Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (25)
Included review availability: This review used your included allowance. Your plan provides up to 2 included reviews per hour; 1 remain after this review. 📝 WalkthroughWalkthroughStructured severity matching is now case-insensitive in the log normalizer and Vector transform configurations. Severity precedence, assignments, and existing syslog-style prefix matching remain unchanged. ChangesStructured severity matching
Priority: ⬇️ Low Estimated code review effort: 2 (Simple) | ~12 minutes Change: Bug fix Suggested reviewers: Merge Risk: ⚪ Minimal · up to The change makes structured log levels case-insensitive while preserving severity precedence and prefix matching. No actionable merge-blocking risk is identified; merge after normal checks pass. 🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (3 passed)
Full details: Description checkExplanation The description explains the issue, the implementation, the precedence behavior, the Jira issue, and the test plan. However, it omits the mandatory /cc and /assign entries and does not include the required Links section. Full details: Docstring CoverageExplanation Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 2 functions across 2 files. (23 skipped: 23 unsupported.)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: kchawlani19 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 |
|
@kchawlani19: all tests passed! 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. |
Summary
"level":"info"were matched case-sensitively, so"level":"INFO"missed attempt 4 inSetLogLevel.{"message":"There were no error","level":"INFO"}was stored aserror.(?i:...)). Klog prefixes such as^E[0-9]+stay case-sensitive, and a matching level field still wins over words in the message.Test plan
TestStructuredLevelIsCaseInsensitivecovers uppercase JSON, logfmt, andValue:tokens, and checks that a lowercase klog-like prefix is not treated as an errormake test-unitfor the vector generator fixtures (internal/generator/vector/inputandinternal/generator/vector/conf){"message":"There were no error","level":"INFO"}and confirm.levelisinfoSummary by CodeRabbit
level=,Value:, and JSON level values. Existing severity precedence and syslog-style prefix matching are unchanged.