-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use the correct parser for truncation #14985
Use the correct parser for truncation #14985
Conversation
This was broken in the parser injection refactor and this didn't inject the properly configured object. Also cleans up some global init() calls as well and moves it to the pattern of how we initialize the rest which we need to pass in the parser correctly anyway. Signed-off-by: Dirkjan Bussink <[email protected]>
Review ChecklistHello reviewers! 👋 Please follow this checklist when reviewing this Pull Request. General
Tests
Documentation
New flags
If a workflow is added or modified:
Backward compatibility
|
@@ -55,10 +55,9 @@ var ( | |||
</thead> | |||
`) | |||
querylogzFuncMap = template.FuncMap{ | |||
"stampMicro": func(t time.Time) string { return t.Format(time.StampMicro) }, | |||
"cssWrappable": logz.Wrappable, | |||
"truncateQuery": sqlparser.NewTestParser().TruncateForUI, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sqlparser.NewTestParser()
is the problematic bit here, I did that to then revisit later but I missed that 🤦
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## main #14985 +/- ##
=======================================
Coverage 47.29% 47.30%
=======================================
Files 1139 1139
Lines 238914 238918 +4
=======================================
+ Hits 113004 113018 +14
+ Misses 117315 117308 -7
+ Partials 8595 8592 -3 ☔ View full report in Codecov by Sentry. |
This was broken in the parser injection refactor and this didn't inject the properly configured object.
Also cleans up some global init() calls as well and moves it to the pattern of how we initialize the rest which we need to pass in the parser correctly anyway.
Related Issue(s)
Should have been done in #14822 as part of work on #14717
Checklist