-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
[3006.x] fix utf-8 codec error (it try to decode binary data) #64961
[3006.x] fix utf-8 codec error (it try to decode binary data) #64961
Conversation
Hi there! Welcome to the Salt Community! Thank you for making your first contribution. We have a lengthy process for issues and PRs. Someone from the Core Team will follow up as soon as possible. In the meantime, here’s some information that may help as you continue your Salt journey.
There are lots of ways to get involved in our community. Every month, there are around a dozen opportunities to meet with other contributors and the Salt Core team and collaborate in real time. The best way to keep track is by subscribing to the Salt Community Events Calendar. |
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.
The code being changed here is not ours. It's the tornado version we bundle(after the next major release 3007, we will no longer bundle it).
I'm on the fence about changing this code we vendor...
This should be fixed upstream in the tornado library. |
What does this PR do?
Fix in function
_curl_debug
for debug types being ignored in logging (binary data)What issues does this PR fix or reference?
Fixes:
fix errors in salt-minion log when called
cp.cache_file
Previous Behavior
Before fix in salt-minion log was many repeatedly messages like this:
[salt._logging.impl:1069][ERROR ][17351] An un-handled exception was caught by Salt's global exception handler:
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xfd in position 18: invalid start byte
Traceback (most recent call last):
File "/opt/saltstack/salt/lib/python3.10/site-packages/salt/ext/tornado/curl_httpclient.py", line 497, in _curl_debug
debug_msg = native_str(debug_msg)
File "/opt/saltstack/salt/lib/python3.10/site-packages/salt/ext/tornado/escape.py", line 219, in to_unicode
return value.decode("utf-8")
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xfd in position 18: invalid start byte
New Behavior
Log contains no errors