-
Notifications
You must be signed in to change notification settings - Fork 37
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
[core] Fix decode errors from searchkit #861
[core] Fix decode errors from searchkit #861
Conversation
@pponnuvel For the files that import FileSearcher from Lines 24 to 27 in 4121edf
|
Ah, I didn't realise there's another |
@dosaboy pponnuvel@97b7d05 is the other way. But I've a question. |
I had had issues in the past when using decode error handlers since the injected characters can yield unexpected results from the constraints logic. Having said that I think with the current implementation is reasonably safe. I have however in recent times very seldom comes across this kind of error, would you be able to share anything about what file/output it was that failed? I wonder if a more selective approach would be better i.e. not doing this globally. |
@dosaboy
So we can limit to just to these two too. |
As a "safer" alternative what do you think about putting this behind a config option and making it optional e.g. --handle-utf8-decode-errors. Overkill? |
That's an option. But you need to know it first to ignore it. What you'd see is "failed-parts" in hotsos output which could be due to anything - not necessarily because "decode-errors". Another question is what could be "unsafe" if we ignore it globally. Do we expect only UTF-8 and ignore anything else? or do we want to support multiple encodings? It depends on what we could do when we hit decode errors . If the answer is "nothing as we only "grep" for ASCII text in all log/config files, so ignore it" then I'd prefer the global change (pponnuvel@97b7d05). |
3c4b4a4
to
7884f78
Compare
2ce7298
to
e206fa5
Compare
When UTF-8 decoding fails, searchkit throws an exception. Passing decode_errors='backslashreplace' to cope with that. Fixes canonical#860. Signed-off-by: Ponnuvel Palaniyappan <[email protected]>
e206fa5
to
e2c247b
Compare
@dosaboy Can we get this in? I hit this with every sosreport from a user... |
When UTF-8 decoding fails, searchkit throws an exception.
Passing decode_errors='backslashreplace' to cope with that.
Fixes #860.