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

Fix: avoid decoding body unless it needs to be logged. #571

Merged
merged 2 commits into from
Nov 12, 2023

Conversation

dblock
Copy link
Member

@dblock dblock commented Nov 10, 2023

Description

Avoid calling body.decode() unless we explicitly want the body to be logged.

Issues Resolved

Closes #485.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

Copy link

codecov bot commented Nov 10, 2023

Codecov Report

Merging #571 (117447c) into main (7878364) will increase coverage by 0.10%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main     #571      +/-   ##
==========================================
+ Coverage   71.64%   71.74%   +0.10%     
==========================================
  Files          87       87              
  Lines        7886     7886              
==========================================
+ Hits         5650     5658       +8     
+ Misses       2236     2228       -8     
Files Coverage Δ
opensearchpy/_async/http_aiohttp.py 83.45% <ø> (ø)
opensearchpy/connection/base.py 94.32% <100.00%> (ø)

... and 2 files with indirect coverage changes

Signed-off-by: dblock <dblock@amazon.com>
Signed-off-by: Daniel (dB.) Doubrovkine <dblock@amazon.com>
@VachaShah VachaShah merged commit f02d6de into opensearch-project:main Nov 12, 2023
54 checks passed
@dblock dblock deleted the avoid-body-decode branch November 13, 2023 13:39
roma2023 pushed a commit to roma2023/opensearch-py that referenced this pull request Dec 28, 2023
…-project#571)

Signed-off-by: dblock <dblock@amazon.com>
Signed-off-by: Daniel (dB.) Doubrovkine <dblock@amazon.com>
Signed-off-by: roma2023 <romasaparhan19@gmail.com>
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.

Avoid decoding data in request logging
2 participants