Skip to content

fix(logs): don't classify explicit non-error key/values as error#4824

Open
Siumauricio wants to merge 2 commits into
canaryfrom
fix/log-viewer-false-error-classification
Open

fix(logs): don't classify explicit non-error key/values as error#4824
Siumauricio wants to merge 2 commits into
canaryfrom
fix/log-viewer-false-error-classification

Conversation

@Siumauricio

Copy link
Copy Markdown
Contributor

The log viewer's getLogType matched error keywords against the key of a key/value pair while ignoring its value, so successful lines like ofelia's job summary:

NOTICE [Job "sync-1m"] Finished in "326ms", failed: false, skipped: false, error: none

rendered red as errors. Reproduced with a unit test against the current classifier.

Now key/value pairs whose value explicitly reports a non-error (error: none|null|nil|false|0|-|"", failed: false|no|0, failures=0, : or = separators) are stripped before the error patterns run. Real failures (failed: true, error: exit code 1) still classify as errors, and statusCode-based classification is untouched.

Related #4589 — keyword-based inference still applies when a line carries no explicit level; this PR removes the false positives where the line itself states success.

Fixes #4538

Lines like 'failed: false, error: none' (e.g. ofelia job summaries for
successful runs) were rendered red because the error patterns matched
the key regardless of its value. Strip key/value pairs whose value
explicitly reports a non-error before running the error keyword
patterns.

Fixes #4538
@dosubot dosubot Bot added size:S This PR changes 10-29 lines, ignoring generated files. bug Something isn't working labels Jul 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working size:S This PR changes 10-29 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Log viewer classifies successful lines as "error" (red)

1 participant