Skip to content
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

Closed

Conversation

AntonOvseenko
Copy link

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

@AntonOvseenko AntonOvseenko requested a review from a team as a code owner August 11, 2023 14:13
@AntonOvseenko AntonOvseenko requested review from MKLeb and removed request for a team August 11, 2023 14:13
@welcome
Copy link

welcome bot commented Aug 11, 2023

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.
Please be sure to review our Code of Conduct. Also, check out some of our community resources including:

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.
If you have additional questions, email us at [email protected]. We’re glad you’ve joined our community and look forward to doing awesome things with you!

@salt-project-bot-prod-environment salt-project-bot-prod-environment bot changed the title fix utf-8 codec error (it try to decode binary data) [3006.x] fix utf-8 codec error (it try to decode binary data) Aug 11, 2023
Copy link
Collaborator

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...

@AntonOvseenko AntonOvseenko temporarily deployed to ci August 13, 2023 18:08 — with GitHub Actions Inactive
@AntonOvseenko AntonOvseenko temporarily deployed to ci August 13, 2023 18:08 — with GitHub Actions Inactive
@AntonOvseenko AntonOvseenko temporarily deployed to ci August 13, 2023 18:08 — with GitHub Actions Inactive
@AntonOvseenko AntonOvseenko temporarily deployed to ci August 13, 2023 18:08 — with GitHub Actions Inactive
@AntonOvseenko AntonOvseenko temporarily deployed to ci August 13, 2023 18:24 — with GitHub Actions Inactive
@AntonOvseenko AntonOvseenko temporarily deployed to ci August 13, 2023 18:27 — with GitHub Actions Inactive
@AntonOvseenko AntonOvseenko temporarily deployed to ci August 13, 2023 19:30 — with GitHub Actions Inactive
@AntonOvseenko AntonOvseenko temporarily deployed to ci August 13, 2023 19:30 — with GitHub Actions Inactive
@AntonOvseenko AntonOvseenko temporarily deployed to ci August 13, 2023 19:30 — with GitHub Actions Inactive
@AntonOvseenko AntonOvseenko temporarily deployed to ci August 13, 2023 19:31 — with GitHub Actions Inactive
@AntonOvseenko AntonOvseenko temporarily deployed to ci August 13, 2023 19:31 — with GitHub Actions Inactive
@AntonOvseenko AntonOvseenko temporarily deployed to ci August 13, 2023 19:31 — with GitHub Actions Inactive
@dwoz dwoz added this to the Sulfur v3006.6 milestone Dec 11, 2023
@dwoz dwoz modified the milestones: Sulfur v3006.6, Sulfur v3006.9 Jun 22, 2024
@dwoz
Copy link
Contributor

dwoz commented Jul 19, 2024

This should be fixed upstream in the tornado library.

@dwoz dwoz closed this Jul 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants